Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion modules/aerodyn/src/AeroAcoustics.f90
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ subroutine SetParameters( InitInp, InputFileData, p, AFInfo, ErrStat, ErrMsg )
character(*), parameter :: RoutineName = 'SetParameters'
REAL(ReKi) :: val1,val10,f2,f4, dist1, dist10
REAL(ReKi) :: BladeSpanUsedForNoise
REAL(ReKi) :: LastElemPct

! Initialize variables for this routine
ErrStat = ErrID_None
Expand Down Expand Up @@ -271,7 +272,14 @@ subroutine SetParameters( InitInp, InputFileData, p, AFInfo, ErrStat, ErrMsg )
p%BlSpn = InitInp%BlSpn
p%BlChord = InitInp%BlChord

IF (InputFileData%AA_Bl_Prcntge .lt. (100.*(p%BlSpn(p%NumBlNds,1) - p%BlSpn(p%NumBlNds-1,1))/p%BlSpn(p%NumBlNds,1))) THEN
! Calculate last element size as percentage of blade span
IF (p%NumBlNds > 1) THEN
LastElemPct = 100.0 * (p%BlSpn(p%NumBlNds,1) - p%BlSpn(p%NumBlNds-1,1)) / p%BlSpn(p%NumBlNds,1)
ELSE
LastElemPct = 100.0 ! Single node means element spans entire blade
ENDIF

IF (InputFileData%AA_Bl_Prcntge .lt. LastElemPct) THEN
CALL SetErrStat(ErrID_Warn, 'BldPrcnt is smaller than the last blade element size. '// &
'OpenFAST will move on assuming the last blade element, which is the minimum blade span used for noise calculations. '// &
'Either increase BldPrcnt in your aeroacoustic input file '// &
Expand Down
8 changes: 7 additions & 1 deletion modules/aerodyn/src/FVW_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,13 @@ subroutine ResolveGridAxis(AStart, AEnd, n, ListFile, Pts, ErrStat, ErrMsg)
return
endif
do j = 1, n
read(UnList, *) Pts(j)
read(UnList, *, iostat=IOS) Pts(j)
if (IOS /= 0) then
call SetErrStat(ErrID_Fatal, 'ResolveGridAxis: error reading grid point #'//trim(Num2LStr(j))//' from grid point list file "'//trim(FullFile)//'" (iostat='//trim(Num2LStr(IOS))//').', &
ErrStat, ErrMsg, 'ResolveGridAxis')
close(UnList)
return
end if
enddo
close(UnList)

Expand Down
16 changes: 12 additions & 4 deletions modules/inflowwind/src/IfW_FlowField.f90
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,19 @@ subroutine IfW_FlowField_GetVelAcc(FF, IStart, Time, PositionXYZ, VelocityUVW, A

! Determine if acceleration should be calculated and returned
OutputAccel = allocated(AccelUVW)
! Cubic velocity interpolation also requires a valid acceleration field, since its
! formula uses the derivative data even when acceleration output is not requested.
! Cubic velocity interpolation also requires a valid acceleration field,
! since its formula uses the derivative data even when acceleration output is not requested.
if ((OutputAccel .or. FF%VelInterpCubic) .and. .not. FF%AccFieldValid) then
call SetErrStat(ErrID_Fatal, "Accel output requested, but accel field is not valid", &
ErrStat, ErrMsg, RoutineName)
if (OutputAccel .and. FF%VelInterpCubic) then
call SetErrStat(ErrID_Fatal, "Acceleration output and cubic velocity interpolation both require a valid acceleration field, but the acceleration field is not valid", &
ErrStat, ErrMsg, RoutineName)
else if (OutputAccel) then
call SetErrStat(ErrID_Fatal, "Acceleration output requested, but the acceleration field is not valid", &
ErrStat, ErrMsg, RoutineName)
else ! FF%VelInterpCubic
call SetErrStat(ErrID_Fatal, "Cubic velocity interpolation requires a valid acceleration field, but the acceleration field is not valid", &
ErrStat, ErrMsg, RoutineName)
end if
return
end if

Expand Down
Loading