Skip to content

Commit

Permalink
UA: minor updates
Browse files Browse the repository at this point in the history
- update extension of UA output files
- explicitly initialize `d_34_to_ac`
  • Loading branch information
bjonkman committed Nov 16, 2023
1 parent abbfd59 commit 4cc616f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion modules/aerodyn/src/BEMT.f90
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ subroutine BEMT_Set_UA_InitData( InitInp, interval, Init_UA_Data, errStat, errMs
call move_alloc(InitInp%UAOff_outerNode, Init_UA_Data%UAOff_outerNode)

Init_UA_Data%dt = interval
Init_UA_Data%OutRootName = InitInp%RootName ! was 'Debug.UA'
Init_UA_Data%OutRootName = trim(InitInp%RootName)//'.UA'

Init_UA_Data%numBlades = InitInp%numBlades
Init_UA_Data%nNodesPerBlade = InitInp%numBladeNodes
Expand All @@ -138,6 +138,7 @@ subroutine BEMT_Set_UA_InitData( InitInp, interval, Init_UA_Data, errStat, errMs
Init_UA_Data%WrSum = InitInp%SumPrint

Init_UA_Data%UA_OUTS = 0
Init_UA_Data%d_34_to_ac = 0.5_ReKi

end subroutine BEMT_Set_UA_InitData

Expand Down
3 changes: 2 additions & 1 deletion modules/aerodyn/src/FVW.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1591,7 +1591,7 @@ subroutine UA_Init_Wrapper(AFInfo, InitInp, interval, p, x, xd, OtherState, m, E
Init_UA_Data%c(i,1) = p%W(iW)%chord_LL(i) ! NOTE: InitInp chord move-allocd to p
end do
Init_UA_Data%dt = interval
Init_UA_Data%OutRootName = trim(InitInp%RootName)//'W'//num2lstr(iW)
Init_UA_Data%OutRootName = trim(InitInp%RootName)//'W'//num2lstr(iW)//'.UA'
Init_UA_Data%numBlades = 1
Init_UA_Data%nNodesPerBlade = InitInp%numBladeNodes ! At AeroDyn ndoes, not CP

Expand All @@ -1601,6 +1601,7 @@ subroutine UA_Init_Wrapper(AFInfo, InitInp, interval, p, x, xd, OtherState, m, E
Init_UA_Data%ShedEffect = .False. ! Important, when coupling UA wih vortex code, shed vorticity is inherently accounted for
Init_UA_Data%WrSum = InitInp%SumPrint
Init_UA_Data%UA_OUTS = 0
Init_UA_Data%d_34_to_ac = 0.5_ReKi

allocate(Init_UA_Data%UAOff_innerNode(1), stat=errStat2)
allocate(Init_UA_Data%UAOff_outerNode(1), stat=errStat2)
Expand Down
2 changes: 1 addition & 1 deletion modules/aerodyn/src/UA_Dvr_Subs.f90
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ subroutine driverInputsToUAInitData(p, InitInData, AFI_Params, AFIndx, errStat,
InitInData%c(1,1) = p%Chord
InitInData%UAMod = p%UAMod
InitInData%Flookup = p%Flookup
InitInData%OutRootName = p%OutRootName
InitInData%OutRootName = trim(p%OutRootName)//'.UA'
InitInData%WrSum = p%SumPrint
InitInData%d_34_to_ac = p%d_34_to_ac ! d_34_to_ac = d_QT ~0.5 [-], Approximated using y coordinate

Expand Down
4 changes: 2 additions & 2 deletions modules/aerodyn/src/UnsteadyAero.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1416,11 +1416,11 @@ subroutine UA_Init_Outputs(InitInp, p, y, InitOut, errStat, errMsg)

! --- Write to File
if ((p%NumOuts > 0) .and. p%UA_OUTS==2) then
call WrScr(' UA: Writing separate output file: '//trim((InitInp%OutRootName)//'.UA.out'))
call WrScr(' UA: Writing separate output file: '//trim((InitInp%OutRootName)//'.out'))
CALL GetNewUnit( p%unOutFile, ErrStat2, ErrMsg2 )
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
if (ErrStat >= AbortErrLev) return
CALL OpenFOutFile ( p%unOutFile, trim(InitInp%OutRootName)//'.UA.out', ErrStat2, ErrMsg2 )
CALL OpenFOutFile ( p%unOutFile, trim(InitInp%OutRootName)//'.out', ErrStat2, ErrMsg2 )
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
if (ErrStat >= AbortErrLev) return

Expand Down
2 changes: 1 addition & 1 deletion modules/nwtc-library/src/NWTC_Num.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4984,7 +4984,7 @@ FUNCTION RegCubicSplineInterpM ( X, XAry, YAry, DelX, Coef, ErrStat, ErrMsg ) RE
RETURN
END FUNCTION RegCubicSplineInterpM ! ( X, XAry, YAry, DelX, Coef, ErrStat, ErrMsg )
!=======================================================================
!> This routine is used to integrate funciton f over the interval [a, b]. This routine
!> This routine is used to integrate function f over the interval [a, b]. This routine
!! is useful for sufficiently smooth (e.g., analytic) integrands, integrated over
!! intervals which contain no singularities, and where the endpoints are also nonsingular.
!!
Expand Down

0 comments on commit 4cc616f

Please sign in to comment.