Skip to content

Commit c0b8fa3

Browse files
authored
Merge pull request #3296 from luwang00/b/fvw_notice
FVW: Fix notification about wake extent
2 parents ccbeec5 + ebbc2f3 commit c0b8fa3

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

modules/aerodyn/src/AeroDyn.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,7 @@ subroutine RotCavtCrit(u, p, m, errStat, errMsg)
24782478
SigmaCavitCrit = ( p%rotors(iR)%Patm + ( p%rotors(iR)%Gravity * ( abs( u%rotors(iR)%BladeMotion(j)%Position(3,i) + u%rotors(iR)%BladeMotion(j)%TranslationDisp(3,i) ) + p%rotors(iR)%MSL2SWL ) * p%rotors(iR)%airDens ) - p%rotors(iR)%Pvap ) / ( 0.5_ReKi * p%rotors(iR)%airDens * Vreltemp**2 ) ! Critical value of Sigma, cavitation occurs if local cavitation number is greater than this
24792479

24802480
if ( ( SigmaCavitCrit < SigmaCavit ) .and. ( .not. ( m%rotors(iR)%CavitWarnSet(i,j) ) ) ) then
2481-
call WrScr( NewLine//'Cavitation occurred at blade '//trim(num2lstr(j))//' and node '//trim(num2lstr(i))//'.' )
2481+
call WrScr( NewLine//'Cavitation occurred at rotor '//trim(num2lstr(iR))//', blade '//trim(num2lstr(j))//', and node '//trim(num2lstr(i))//'.' )
24822482
m%rotors(iR)%CavitWarnSet(i,j) = .true.
24832483
end if
24842484

modules/aerodyn/src/FVW.f90

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,10 @@ subroutine FVW_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
14891489
character(*), intent( out) :: ErrMsg !< Error message if ErrStat /= ErrID_None
14901490
! Local variables
14911491
integer(IntKi) :: nP
1492+
integer(IntKi) :: iStepFVW
1493+
logical, save :: FirstNotice_FreeNearWake = .true.
1494+
logical, save :: FirstNotice_NearWake = .true.
1495+
logical, save :: FirstNotice_FullWake = .true.
14921496
integer(IntKi) :: ErrStat2
14931497
character(ErrMsgLen) :: ErrMsg2
14941498
character(*), parameter :: RoutineName = 'FVW_CalcOutput'
@@ -1514,23 +1518,24 @@ subroutine FVW_CalcOutput(t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg)
15141518
endif
15151519

15161520
! Write some info to screen when major milestone achieved
1517-
if (m%iStep == p%nNWFree .and. p%nNWFree<p%nNWMax) then
1518-
nP = CountCPs(p, p%nNWFree, 0)
1519-
call WrScr(NewLine//'[INFO] OLAF free near wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1520-
endif
1521-
if (m%iStep == p%nNWMax) then
1522-
nP = CountCPs(p, p%nNWMax, 0)
1523-
if (p%nFWMax==0) then
1524-
call WrScr(NewLine//'[INFO] OLAF wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1525-
else
1526-
call WrScr(NewLine//'[INFO] OLAF near wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1527-
endif
1528-
endif
1529-
if (p%nFWMax>0 .and. m%iStep== p%nNWMax+p%nFWMax) then
1521+
iStepFVW = floor(t/p%DTfvw+1.0E-6_DbKi)
1522+
if (FirstNotice_FullWake .and. iStepFVW == p%nNWMax+p%nFWMax) then
15301523
nP = CountCPs(p, p%nNWMax, p%nFWMax)
15311524
call WrScr(NewLine//'[INFO] OLAF wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1532-
endif
1533-
1525+
FirstNotice_FullWake = .false.
1526+
FirstNotice_NearWake = .false.
1527+
FirstNotice_FreeNearWake = .false.
1528+
elseif (FirstNotice_NearWake .and. iStepFVW == p%nNWMax) then ! implies p%nFWMax > 0
1529+
nP = CountCPs(p, p%nNWMax, 0_IntKi)
1530+
call WrScr(NewLine//'[INFO] OLAF near wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1531+
FirstNotice_NearWake = .false.
1532+
FirstNotice_FreeNearWake = .false.
1533+
elseif (FirstNotice_FreeNearWake .and. iStepFVW == p%nNWFree) then ! implies p%nNWFree<p%nNWMax
1534+
nP = CountCPs(p, p%nNWFree, 0_IntKi)
1535+
call WrScr(NewLine//'[INFO] OLAF free near wake is at full extent - '//trim(num2lstr(t))//'s, '//trim(num2lstr(nP))//' points.')
1536+
FirstNotice_FreeNearWake = .false.
1537+
end if
1538+
15341539
! --- Export to VTK
15351540
if (m%VTKstep==-1) then
15361541
! Has never been called, special handling for init

0 commit comments

Comments
 (0)