diff --git a/modules/aerodyn/src/AeroDyn.f90 b/modules/aerodyn/src/AeroDyn.f90 index 0bc7f0b601..c9220e2e9f 100644 --- a/modules/aerodyn/src/AeroDyn.f90 +++ b/modules/aerodyn/src/AeroDyn.f90 @@ -318,17 +318,17 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut if (Failed()) return; ! Temporary HACK, for WakeMod=10, 11 or 12 use AeroProjMod 2 (will trigger PolarBEM) - if (InputFileData%WakeMod==10) then - call WrScr(' WARNING: WakeMod=10 is a temporary hack. Using new projection method with WakeMod=0.') - InputFileData%WakeMod = 0 + if (InputFileData%Wake_Mod==10) then + call WrScr(' WARNING: Wake_Mod=10 is a temporary hack. Using new projection method with Wake_Mod=0.') + InputFileData%Wake_Mod = 0 AeroProjMod(:) = 2 - elseif (InputFileData%WakeMod==11) then - call WrScr(' WARNING: WakeMod=11 is a temporary hack. Using new projection method with WakeMod=1.') - InputFileData%WakeMod = 1 + elseif (InputFileData%Wake_Mod==11) then + call WrScr(' WARNING: Wake_Mod=11 is a temporary hack. Using new projection method with Wake_Mod=1.') + InputFileData%Wake_Mod = 1 AeroProjMod(:) = 2 - elseif (InputFileData%WakeMod==12) then - call WrScr(' WARNING: WakeMod=12 is a temporary hack. Using new projection method with WakeMod=2.') - InputFileData%WakeMod = 2 + elseif (InputFileData%Wake_Mod==12) then + call WrScr(' WARNING: Wake_Mod=12 is a temporary hack. Using new projection method with Wake_Mod=2.') + InputFileData%Wake_Mod = 2 AeroProjMod(:) = 2 endif @@ -370,7 +370,7 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut p%rotors(iR)%AeroProjMod = InitInp%rotors(iR)%AeroProjMod !p%rotors(iR)%AeroProjMod = AeroProjMod(iR) call WrScr(' AeroDyn: projMod: '//trim(num2lstr(p%rotors(iR)%AeroProjMod))) - if (AeroProjMod(iR) == APM_BEM_Polar .and. InputFileData%WakeMod==WakeMod_FVW) then + if (AeroProjMod(iR) == APM_BEM_Polar .and. InputFileData%Wake_Mod==WakeMod_FVW) then call WrScr('AeroProj cannot be 2 (somehow) when using OLAF - Aborting') STOP endif @@ -413,7 +413,7 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut ! initialize BEMT after setting parameters and inputs because we are going to use the already- ! calculated node positions from the input meshes - if (p%WakeMod /= WakeMod_FVW) then + if (p%Wake_Mod /= WakeMod_FVW) then do iR = 1, nRotors call Init_BEMTmodule( InputFileData, InputFileData%rotors(iR), u%rotors(iR), m%rotors(iR)%BEMT_u(1), p%rotors(iR), p, x%rotors(iR)%BEMT, xd%rotors(iR)%BEMT, z%rotors(iR)%BEMT, & OtherState%rotors(iR)%BEMT, m%rotors(iR)%BEMT_y, m%rotors(iR)%BEMT, ErrStat2, ErrMsg2 ) @@ -432,7 +432,7 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut end if enddo - else ! if (p%WakeMod == WakeMod_FVW) then + else ! if (p%Wake_Mod == WakeMod_FVW) then !------------------------------------------------------------------------------------------------- ! Initialize FVW module if it is used @@ -578,7 +578,7 @@ subroutine AD_ReInit(p, x, xd, z, OtherState, m, Interval, ErrStat, ErrMsg ) ! and the UA filter end if - if (p%WakeMod /= WakeMod_FVW) then + if (p%Wake_Mod /= WakeMod_FVW) then do IR=1, size(p%rotors) call BEMT_ReInit(p%rotors(iR)%BEMT,x%rotors(iR)%BEMT,xd%rotors(iR)%BEMT,z%rotors(iR)%BEMT,OtherState%rotors(iR)%BEMT,m%rotors(iR)%BEMT,ErrStat,ErrMsg) @@ -619,7 +619,7 @@ subroutine Init_MiscVars(m, p, p_AD, u, y, errStat, errMsg) call AllocAry( m%DisturbedInflow, 3_IntKi, p%NumBlNds, p%numBlades, 'm%DisturbedInflow', ErrStat2, ErrMsg2 ) ! must be same size as u%InflowOnBlade call SetErrStat( errStat2, errMsg2, errStat, errMsg, RoutineName ) -if ((p_AD%SectAvg) .and. ((p_AD%WakeMod == WakeMod_BEMT).or.(p_AD%WakeMod == WakeMod_DBEMT)) ) then +if ((p_AD%SectAvg) .and. ((p_AD%Wake_Mod == WakeMod_BEMT)) ) then call AllocAry( m%SectAvgInflow, 3_IntKi, p%NumBlNds, p%numBlades, 'm%SectAvgInflow' , ErrStat2, ErrMsg2 ); if(Failed()) return endif call AllocAry( m%orientationAnnulus, 3_IntKi, 3_IntKi, p%NumBlNds, p%numBlades, 'm%orientationAnnulus', ErrStat2, ErrMsg2 ) @@ -1326,7 +1326,7 @@ subroutine SetParameters( InitInp, InputFileData, RotData, p, p_AD, ErrStat, Err p%MHK = InitInp%MHK p_AD%DT = InputFileData%DTAero - p_AD%WakeMod = InputFileData%WakeMod + p_AD%Wake_Mod = InputFileData%Wake_Mod p%DBEMT_Mod = InputFileData%DBEMT_Mod p%TwrPotent = InputFileData%TwrPotent p%TwrShadow = InputFileData%TwrShadow @@ -1552,7 +1552,7 @@ subroutine AD_End( u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) ! Place any last minute operations or calculations here: ! End the FVW submodule - if (p%WakeMod == WakeMod_FVW ) then + if (p%Wake_Mod == WakeMod_FVW ) then if ( p%UA_Flag ) then do iW=1,p%FVW%nWings @@ -1657,7 +1657,7 @@ subroutine AD_UpdateStates( t, n, u, utimes, p, x, xd, z, OtherState, m, errStat - if (p%WakeMod /= WakeMod_FVW) then + if (p%Wake_Mod /= WakeMod_FVW) then do iR = 1,size(p%rotors) ! Call into the BEMT update states NOTE: This is a non-standard framework interface!!!!! GJH call BEMT_UpdateStates(t, n, m%rotors(iR)%BEMT_u(:), BEMT_utimes, p%rotors(iR)%BEMT, x%rotors(iR)%BEMT, xd%rotors(iR)%BEMT, z%rotors(iR)%BEMT, OtherState%rotors(iR)%BEMT, p%AFI, m%rotors(iR)%BEMT, errStat2, errMsg2) @@ -1861,7 +1861,7 @@ subroutine AD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg, if(Failed()) return enddo - if (p%WakeMod == WakeMod_FVW) then + if (p%Wake_Mod == WakeMod_FVW) then ! This needs to extract the inputs from the AD data types (mesh) and copy pieces for the FVW module call SetInputsForFVW(p, (/u/), m, errStat2, errMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) @@ -1946,7 +1946,7 @@ subroutine RotCalcOutput( t, u, p, p_AD, x, xd, z, OtherState, y, m, m_AD, iRot, call SetInputs(t, p, p_AD, u, m, indx, errStat2, errMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then ! Call the BEMT module CalcOutput. Notice that the BEMT outputs are purposely attached to AeroDyn's MiscVar structure to ! avoid issues with the coupling code @@ -2078,10 +2078,10 @@ subroutine AD_CavtCrit(u, p, m, errStat, errMsg) do j = 1,p%rotors(iR)%numBlades ! Loop through all blades do i = 1,p%rotors(iR)%NumBlNds ! Loop through all nodes - if ( p%WakeMod == WakeMod_BEMT .or. p%WakeMod == WakeMod_DBEMT ) then + if ( p%Wake_Mod == WakeMod_BEMT ) then Vreltemp = m%rotors(iR)%BEMT_y%Vrel(i,j) Cpmintemp = m%rotors(iR)%BEMT_y%Cpmin(i,j) - else if ( p%WakeMod == WakeMod_FVW ) then + else if ( p%Wake_Mod == WakeMod_FVW ) then iW = p%FVW%Bld2Wings(iR,j) Vreltemp = m%FVW%W(iW)%BN_Vrel(i) Cpmintemp = m%FVW%W(iW)%BN_Cpmin(i) @@ -2640,7 +2640,7 @@ subroutine SetInputs(t, p, p_AD, u, m, indx, errStat, errMsg) ! Disturbed inflow on blade (if tower shadow present) call SetDisturbedInflow(p, p_AD, u, m, errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, RoutineName) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then if (p_AD%SectAvg) then call SetSectAvgInflow(t, p, p_AD, u, m, errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, RoutineName) @@ -3789,9 +3789,9 @@ SUBROUTINE ValidateInputData( InitInp, InputFileData, NumBl, ErrStat, ErrMsg ) ! end do if (InputFileData%DTAero <= 0.0) call SetErrStat ( ErrID_Fatal, 'DTAero must be greater than zero.', ErrStat, ErrMsg, RoutineName ) - if (InputFileData%WakeMod /= WakeMod_None .and. InputFileData%WakeMod /= WakeMod_BEMT .and. InputFileData%WakeMod /= WakeMod_DBEMT .and. InputFileData%WakeMod /= WakeMod_FVW) then + if (InputFileData%Wake_Mod /= WakeMod_None .and. InputFileData%Wake_Mod /= WakeMod_BEMT .and. InputFileData%Wake_Mod /= WakeMod_FVW) then call SetErrStat ( ErrID_Fatal, 'WakeMod must be '//trim(num2lstr(WakeMod_None))//' (none), '//trim(num2lstr(WakeMod_BEMT))//' (BEMT), '// & - trim(num2lstr(WakeMod_DBEMT))//' (DBEMT), or '//trim(num2lstr(WakeMod_FVW))//' (FVW).',ErrStat, ErrMsg, RoutineName ) + ' or '//trim(num2lstr(WakeMod_FVW))//' (FVW).',ErrStat, ErrMsg, RoutineName ) end if if (InputFileData%TwrPotent /= TwrPotent_none .and. InputFileData%TwrPotent /= TwrPotent_baseline .and. InputFileData%TwrPotent /= TwrPotent_Bak) then @@ -3840,7 +3840,7 @@ SUBROUTINE ValidateInputData( InitInp, InputFileData, NumBl, ErrStat, ErrMsg ) ! BEMT/DBEMT inputs ! bjj: these checks should probably go into BEMT where they are used... - if (InputFileData%WakeMod /= WakeMod_none .and. InputFileData%WakeMod /= WakeMod_FVW) then + if (InputFileData%Wake_Mod /= WakeMod_none .and. InputFileData%Wake_Mod /= WakeMod_FVW) then if ( InputFileData%MaxIter < 1 ) call SetErrStat( ErrID_Fatal, 'MaxIter must be greater than 0.', ErrStat, ErrMsg, RoutineName ) if ( InputFileData%IndToler < 0.0 .or. EqualRealNos(InputFileData%IndToler, 0.0_ReKi) ) & @@ -4055,17 +4055,17 @@ SUBROUTINE ValidateInputData( InitInp, InputFileData, NumBl, ErrStat, ErrMsg ) ! check for linearization !.................. if (InitInp%Linearize) then + + if (InputFileData%Wake_Mod /= WakeMod_None .and. InputFileData%Wake_Mod /= WakeMod_None) then + call SetErrStat( ErrID_Fatal, 'WakeMod must be 0 or 1 for linearization.', ErrStat, ErrMsg, RoutineName ) + endif + if (InputFileData%UAMod /= UA_None .and. InputFileData%UAMod /= UA_HGM .and. InputFileData%UAMod /= UA_HGMV .and. InputFileData%UAMod /= UA_OYE) then call SetErrStat( ErrID_Fatal, 'UAMod must be 0, 4, 5, or 6 for linearization.', ErrStat, ErrMsg, RoutineName ) end if - - if (InputFileData%WakeMod == WakeMod_FVW) then !bjj: note: among other things, WriteOutput values will not be calculated properly in AD Jacobians if FVW this is allowed - call SetErrStat( ErrID_Fatal, 'FVW cannot currently be used for linearization. Set WakeMod=0 or WakeMod=1.', ErrStat, ErrMsg, RoutineName ) - else if (InputFileData%WakeMod == WakeMod_DBEMT) then - if (InputFileData%DBEMT_Mod /= DBEMT_cont_tauConst) then - call SetErrStat( ErrID_Fatal, 'DBEMT requires the continuous formulation with constant tau1 for linearization. Set DBEMT_Mod=3 or set WakeMod to 0 or 1.', ErrStat, ErrMsg, RoutineName ) - end if + if (InputFileData%DBEMT_Mod /= DBEMT_None .or. InputFileData%DBEMT_Mod /= DBEMT_cont_tauConst) then + call SetErrStat( ErrID_Fatal, 'DBEMT Mod must be 0 or 3 (continuous formulation with constant tau1) for linearization. Set DBEMT_Mod=0,3.', ErrStat, ErrMsg, RoutineName ) end if end if @@ -4299,7 +4299,7 @@ SUBROUTINE Init_BEMTmodule( InputFileData, RotInputFileData, u_AD, u, p, p_AD, x InitInp%aTol = InputFileData%IndToler InitInp%useTipLoss = InputFileData%TipLoss InitInp%useHubLoss = InputFileData%HubLoss - InitInp%useInduction = InputFileData%WakeMod /= WakeMod_none + InitInp%useInduction = InputFileData%Wake_Mod == WakeMod_BEMT InitInp%useTanInd = InputFileData%TanInd InitInp%useAIDrag = InputFileData%AIDrag InitInp%useTIDrag = InputFileData%TIDrag @@ -4424,7 +4424,7 @@ SUBROUTINE Init_BEMTmodule( InputFileData, RotInputFileData, u_AD, u, p, p_AD, x if (InitInp%BEM_Mod==BEMMod_2D) then Label = trim(Label)//', BEM: legacy (2D)' elseif (InitInp%BEM_Mod==BEMMod_3D) then - Label = trim(Label)//', BEM: 3D' + Label = trim(Label)//', BEM: polar (3D)' else print*,'Invalid BEM method' STOP @@ -4443,11 +4443,7 @@ SUBROUTINE Init_BEMTmodule( InputFileData, RotInputFileData, u_AD, u, p, p_AD, x InitInp%RootName = InitInp%RootName(1:k-3) end if - if (InputFileData%WakeMod == WakeMod_DBEMT) then - InitInp%DBEMT_Mod = InputFileData%DBEMT_Mod - else - InitInp%DBEMT_Mod = DBEMT_none - end if + InitInp%DBEMT_Mod = InputFileData%DBEMT_Mod InitInp%tau1_const = InputFileData%tau1_const if (ErrStat >= AbortErrLev) then diff --git a/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 b/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 index a7017fd591..543998b15e 100644 --- a/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 +++ b/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 @@ -406,7 +406,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Axial and tangential induced wind velocity ! TODO use m%Vind_i and R_wi CASE ( BldNd_Vindx ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then do iB=1,nB do iNd=1,nNd y%WriteOutput(iOut) = - m%BEMT_u(Indx)%Vx(iNd,iB) * m%BEMT_y%axInduction( iNd,iB) @@ -424,7 +424,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Vindy ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_u(Indx)%Vy(iNd,iB) * m%BEMT_y%tanInduction(iNd,iB) @@ -461,7 +461,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! TODO: Vrel, DynP, Re, Ma - should be unified across lifting-line implementations. Vrel should be computed based on velocities in (a)-system ! Relative wind speed CASE ( BldNd_VRel ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Vrel(iNd,iB) @@ -480,7 +480,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Dynamic pressure CASE ( BldNd_DynP ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = 0.5 * p%airDens * m%BEMT_y%Vrel(iNd,iB)**2 @@ -499,7 +499,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Reynolds number (in millions) CASE ( BldNd_Re ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = p%BEMT%chord(iNd,iB) * m%BEMT_y%Vrel(iNd,iB) / p%KinVisc / 1.0E6 @@ -518,7 +518,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Mach number CASE ( BldNd_M ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Vrel(iNd,iB) / p%SpdSound @@ -538,7 +538,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Axial and tangential induction factors CASE ( BldNd_AxInd ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%axInduction(iNd,iB) @@ -556,7 +556,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_TnInd ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%tanInduction(iNd,iB) @@ -575,7 +575,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Quasi-steady Axial and tangential induction factors CASE ( BldNd_AxInd_qs ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%axInduction_qs(iNd,iB) @@ -593,7 +593,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_TnInd_qs ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%tanInduction_qs(iNd,iB) @@ -613,7 +613,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! AoA, pitch+twist angle, inflow angle, and curvature angle CASE ( BldNd_Alpha ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd ! TODO Change this @@ -632,7 +632,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Theta ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_u(Indx)%theta(iNd,iB)*R2D @@ -650,7 +650,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Phi ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%phi(iNd,iB)*R2D @@ -668,7 +668,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Curve ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%Curve(iNd,iB)*R2D @@ -687,7 +687,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Toe ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_u(Indx)%toeAngle(iNd,iB)*R2D @@ -708,7 +708,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Unsteady lift force, drag force, pitching moment coefficients ! TODO this should be somehow unified across lifting-line implementations CASE ( BldNd_Cl ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Cl(iNd,iB) @@ -726,7 +726,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Cd ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Cd(iNd,iB) @@ -744,7 +744,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Cm ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Cm(iNd,iB) @@ -764,7 +764,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Normal force (to plane), tangential force (to plane) coefficients ! TODO deprecate CASE ( BldNd_Cx ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Cx(iNd,iB) @@ -782,7 +782,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Cy ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%Cy(iNd,iB) @@ -801,7 +801,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Normal force (to chord), and tangential force (to chord) coefficients CASE ( BldNd_Cn ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd ct=cos(m%BEMT_u(Indx)%theta(iNd,iB)) @@ -823,7 +823,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Ct ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd ct=cos(m%BEMT_u(Indx)%theta(iNd,iB)) @@ -847,7 +847,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Lift force, drag force, pitching moment CASE ( BldNd_Fl ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd cp=cos(m%BEMT_y%phi(iNd,iB)) @@ -869,7 +869,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Fd ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd cp=cos(m%BEMT_y%phi(iNd,iB)) @@ -900,7 +900,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Normal force (to chord), and tangential force (to chord) per unit length !CASE( BldNd_Fn ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( y%BladeLoad(iB)%Force (:, iNd), u%BladeMotion(iB)%Orientation(1,:,iNd)); iOut = iOut + 1; enddo;enddo CASE ( BldNd_Fn ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd ct=cos(m%BEMT_u(Indx)%theta(iNd,iB)) @@ -923,7 +923,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx !CASE( BldNd_Ft ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = -dot_product( y%BladeLoad(iB)%Force (:, iNd), u%BladeMotion(iB)%Orientation(2,:,iNd)); iOut = iOut + 1; enddo;enddo CASE ( BldNd_Ft ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd ct=cos(m%BEMT_u(Indx)%theta(iNd,iB)) @@ -992,7 +992,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! TODO: remove me, Vx, Vy can be computed from other outputs (and they are in legacy coordinate system) CASE ( BldNd_Vx ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_u(Indx)%Vx(iNd,iB) @@ -1010,7 +1010,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_Vy ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_u(Indx)%Vy(iNd,iB) @@ -1028,7 +1028,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_GeomPhi ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then if (allocated(OtherState%BEMT%ValidPhi)) then DO iB=1,nB DO iNd=1,nNd @@ -1059,7 +1059,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx endif CASE ( BldNd_chi ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,nNd y%WriteOutput(iOut) = m%BEMT_y%chi(iNd,iB)*R2D @@ -1078,7 +1078,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx CASE ( BldNd_UA_Flag ) IF (p_AD%UA_Flag) THEN - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes y%WriteOutput(iOut) = m%BEMT%UA%weight(iNd, iB) @@ -1119,7 +1119,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx compIndx = 5 END SELECT - !if (p_AD%WakeMod /= WakeMod_FVW) then + !if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes y%WriteOutput(iOut) = x%BEMT%UA%element(iNd, iB)%x(compIndx) @@ -1148,7 +1148,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! CpMin CASE ( BldNd_CpMin ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes y%WriteOutput(iOut) = m%BEMT_y%Cpmin(iNd,iB) @@ -1171,7 +1171,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! circulation on blade CASE ( BldNd_Gam ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes y%WriteOutput(iOut) = 0.5_ReKi * p%BEMT%chord(iNd,iB) * m%BEMT_y%Vrel(iNd,iB) * m%BEMT_y%Cl(iNd,iB) ! "Gam" [m^2/s] @@ -1194,7 +1194,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! TODO this should be provided by all lifting-line codes ! Cl_Static CASE ( BldNd_Cl_qs ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes !NOT available in BEMT/DBEMT yet @@ -1214,7 +1214,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Cd_Static CASE ( BldNd_Cd_qs ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes !NOT available in BEMT/DBEMT yet @@ -1234,7 +1234,7 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx ! Cm_Static CASE ( BldNd_Cm_qs ) - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then DO iB=1,nB DO iNd=1,u%BladeMotion(iB)%NNodes !NOT available in BEMT/DBEMT yet @@ -1531,7 +1531,7 @@ SUBROUTINE BldNdOuts_SetOutParam(BldNd_OutList, p, p_AD, ErrStat, ErrMsg ) end if ! The following are valid only for BEMT/DBEMT - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then InvalidOutput( BldNd_Cl_qs ) = .true. InvalidOutput( BldNd_Cd_qs ) = .true. InvalidOutput( BldNd_Cm_qs ) = .true. @@ -1544,7 +1544,7 @@ SUBROUTINE BldNdOuts_SetOutParam(BldNd_OutList, p, p_AD, ErrStat, ErrMsg ) endif ! The following are valid only for BEMT/DBEMT - if (p_AD%WakeMod /= WakeMod_BEMT) then + if (p_AD%Wake_Mod /= WakeMod_BEMT) then InvalidOutput( BldNd_BEM_F_qs ) = .true. InvalidOutput( BldNd_BEM_k_qs ) = .true. InvalidOutput( BldNd_BEM_kp_qs ) = .true. @@ -1553,7 +1553,7 @@ SUBROUTINE BldNdOuts_SetOutParam(BldNd_OutList, p, p_AD, ErrStat, ErrMsg ) ! it's going to be very difficult to get the FVW states without rewriting a bunch of code - if (.not. p_AD%UA_Flag .or. p_AD%WakeMod == WakeMod_FVW) then ! also invalid if AFAeroMod is not 4,5,6 + if (.not. p_AD%UA_Flag .or. p_AD%Wake_Mod == WakeMod_FVW) then ! also invalid if AFAeroMod is not 4,5,6 InvalidOutput( BldNd_UA_x1 ) = .true. InvalidOutput( BldNd_UA_x2 ) = .true. InvalidOutput( BldNd_UA_x3 ) = .true. diff --git a/modules/aerodyn/src/AeroDyn_Driver_Subs.f90 b/modules/aerodyn/src/AeroDyn_Driver_Subs.f90 index acf16ae0ad..9b27b9f0ea 100644 --- a/modules/aerodyn/src/AeroDyn_Driver_Subs.f90 +++ b/modules/aerodyn/src/AeroDyn_Driver_Subs.f90 @@ -445,7 +445,7 @@ subroutine Init_ADI_ForDriver(iCase, ADI, dvr, FED, dt, errStat, errMsg) !call AD_Dvr_DestroyAeroDyn_Data (AD , errStat2, errMsg2); call SetErrStat(errStat2, errMsg2, errStat, errMsg, RoutineName) needInit=.true. endif - if (ADI%p%AD%WakeMod == WakeMod_FVW) then + if (ADI%p%AD%Wake_Mod == WakeMod_FVW) then call WrScr('[INFO] OLAF is used, AeroDyn will be re-initialized') needInit=.true. endif diff --git a/modules/aerodyn/src/AeroDyn_IO.f90 b/modules/aerodyn/src/AeroDyn_IO.f90 index a18afcf2aa..7b4291131b 100644 --- a/modules/aerodyn/src/AeroDyn_IO.f90 +++ b/modules/aerodyn/src/AeroDyn_IO.f90 @@ -123,7 +123,7 @@ SUBROUTINE Calc_WriteOutput( p, p_AD, u, x, m, m_AD, y, OtherState, xd, indx, iR tmpHubMB = 0.0_ReKi ! Compute max radius and rotor speed - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then rmax = 0.0_ReKi do k=1,p%NumBlades do j=1,p%NumBlNds @@ -141,7 +141,7 @@ SUBROUTINE Calc_WriteOutput( p, p_AD, u, x, m, m_AD, y, OtherState, xd, indx, iR call Calc_WriteOutput_AD() ! need to call this before calling the BEMT vs FVW versions of outputs so that the integrated output quantities are known - if (p_AD%WakeMod /= WakeMod_FVW) then + if (p_AD%Wake_Mod /= WakeMod_FVW) then call Calc_WriteOutput_BEMT() else call Calc_WriteOutput_FVW() @@ -659,7 +659,7 @@ SUBROUTINE ParsePrimaryFileInfo( PriPath, InitInp, InputFile, RootName, NumBlade integer(IntKi) :: CurLine !< current entry in FileInfo_In%Lines array real(ReKi) :: TmpRe5(5) !< temporary 8 number array for reading values in character(1024) :: sDummy !< temporary string - logical :: frozenWakeProvided, skewModProvided, AFAeroModProvided, isLegalComment, firstWarn !< Temporary for legacy purposes + logical :: wakeModProvided, frozenWakeProvided, skewModProvided, AFAeroModProvided, isLegalComment, firstWarn !< Temporary for legacy purposes character(*), parameter :: RoutineName = 'ParsePrimaryFileInfo' @@ -705,8 +705,21 @@ SUBROUTINE ParsePrimaryFileInfo( PriPath, InitInp, InputFile, RootName, NumBlade ! DTAero - Time interval for aerodynamic calculations {or default} (s): call ParseVarWDefault ( FileInfo_In, CurLine, "DTAero", InputFileData%DTAero, interval, ErrStat2, ErrMsg2, UnEc ) if (Failed()) return - ! WakeMod - Type of wake/induction model (switch) {0=none, 1=BEMT, 2=TBD, 3=OLAF} [WakeMod cannot be 2 or 3 when linearizing] + ! WakeMod - LEGACY call ParseVar( FileInfo_In, CurLine, "WakeMod", InputFileData%WakeMod, ErrStat2, ErrMsg2, UnEc ); if (Failed()) return + wakeModProvided = legacyInputPresent('WakeMod', CurLine, ErrStat2, ErrMsg2, 'Wake_Mod=0 (WakeMod=0), Wake_Mod=1 (WakeMod=1), DBEMT_Mod>0 (WakeMod=2, Wake_Mod=3 (WakeMod=3)') + ! Wake_Mod- Type of wake/induction model (switch) {0=none, 1=BEMT, 2=TBD, 3=OLAF} + call ParseVar( FileInfo_In, CurLine, "Wake_Mod", InputFileData%Wake_Mod, ErrStat2, ErrMsg2, UnEc ) + if (newInputAbsent('Wake_Mod', CurLine, errStat2, errMsg2)) then + call WrScr(' Setting Wake_Mod to 1 (BEM active) as the input is absent (typical behavior).') + InputFileData%Wake_Mod = WakeMod_BEMT + else + if (wakeModProvided) then + call LegacyAbort('Cannot have both Wake_Mod and WakeMod in the input file'); return + endif + endif + + ! AFAeroMod - Type of blade airfoil aerodynamics model (switch) {1=steady model, 2=Beddoes-Leishman unsteady model} [AFAeroMod must be 1 when linearizing] call ParseVar( FileInfo_In, CurLine, "AFAeroMod", InputFileData%AFAeroMod, ErrStat2, ErrMsg2, UnEc ) AFAeroModProvided = legacyInputPresent('AFAeroMod', CurLine, ErrStat2, ErrMsg2, 'UAMod=0 (AFAeroMod=1), UAMod>1 (AFAeroMod=2)') @@ -1046,6 +1059,20 @@ SUBROUTINE ParsePrimaryFileInfo( PriPath, InitInp, InputFile, RootName, NumBlade call WrScr(' FrozenWake=False -> Not changing DBEMT_Mod') endif endif + if (wakeModProvided) then + InputFileData%Wake_Mod = InputFileData%WakeMod + if (InputFileData%WakeMod==1) then + call WrScr(' WakeMod=1 -> Setting DBEMT_Mod=0') + ! Turn off DBEMT + InputFileData%DBEMT_Mod=DBEMT_none + else if (InputFileData%WakeMod==2) then + call WrScr(' WakeMod=2 -> Setting Wake_Mod=1 (BEMT) (DBEMT_Mod needs to be >0)') + InputFileData%Wake_Mod = WakeMod_BEMT + if (InputFileData%DBEMT_Mod < DBEMT_none) then + call LegacyAbort('DBEMT should be >0 when using legacy input WakeMod=2') + endif + endif + endif if (AFAeroModProvided) then if (InputFileData%AFAeroMod==1) then call WrScr(' AFAeroMod=1 -> Setting UAMod=0') @@ -1513,11 +1540,9 @@ SUBROUTINE AD_PrintSum( InputFileData, p, p_AD, u, y, ErrStat, ErrMsg ) WRITE (UnSu,'(/,A)') '====== General Options ============================================================================' ! WakeMod - select case (p_AD%WakeMod) + select case (p_AD%Wake_Mod) case (WakeMod_BEMT) Msg = 'Blade-Element/Momentum Theory' - case (WakeMod_DBEMT) - Msg = 'Dynamic Blade-Element/Momentum Theory' case (WakeMod_FVW) Msg = 'Free Vortex Wake Theory' case (WakeMod_None) @@ -1525,7 +1550,7 @@ SUBROUTINE AD_PrintSum( InputFileData, p, p_AD, u, y, ErrStat, ErrMsg ) case default Msg = 'unknown' end select - WRITE (UnSu,Ec_IntFrmt) p_AD%WakeMod, 'WakeMod', 'Type of wake/induction model: '//TRIM(Msg) + WRITE (UnSu,Ec_IntFrmt) p_AD%Wake_Mod, 'WakeMod', 'Type of wake/induction model: '//TRIM(Msg) ! TwrPotent select case (p%TwrPotent) @@ -1580,7 +1605,7 @@ SUBROUTINE AD_PrintSum( InputFileData, p, p_AD, u, y, ErrStat, ErrMsg ) WRITE (UnSu,Ec_LgFrmt) p%Buoyancy, 'Buoyancy', 'Include buoyancy effects? '//TRIM(Msg) - if (p_AD%WakeMod/=WakeMod_none) then + if (p_AD%Wake_Mod/=WakeMod_none) then WRITE (UnSu,'(A)') '====== Blade-Element/Momentum Theory Options ======================================================' ! SkewMod @@ -1649,6 +1674,8 @@ SUBROUTINE AD_PrintSum( InputFileData, p, p_AD, u, y, ErrStat, ErrMsg ) select case (InputFileData%DBEMT_Mod) case (DBEMT_frozen) Msg = 'frozen-wake' + case (DBEMT_none) + Msg = 'quasi-steady' case (DBEMT_tauConst) Msg = 'dynamic - constant tau1' case (DBEMT_tauVaries) @@ -1818,7 +1845,7 @@ SUBROUTINE SetOutParam(OutList, p, p_AD, ErrStat, ErrMsg ) end if - if (p_AD%WakeMod /= WakeMod_DBEMT) then + if (p%DBEMT_Mod > DBEMT_none) then InvalidOutput( DBEMTau1 ) = .true. end if diff --git a/modules/aerodyn/src/AeroDyn_Registry.txt b/modules/aerodyn/src/AeroDyn_Registry.txt index 73f5e5b5f7..b10c73ddc9 100644 --- a/modules/aerodyn/src/AeroDyn_Registry.txt +++ b/modules/aerodyn/src/AeroDyn_Registry.txt @@ -21,7 +21,7 @@ usefrom InflowWind.txt param AeroDyn/AD - IntKi ModelUnknown - -1 - "" - param ^ - IntKi WakeMod_none - 0 - "Wake model - none" - param ^ - IntKi WakeMod_BEMT - 1 - "Wake model - BEMT (blade elememnt momentum theory)" - -param ^ - IntKi WakeMod_DBEMT - 2 - "Wake model - DBEMT (dynamic elememnt momentum theory)" - +#param ^ - IntKi WakeMod_TODO - 2 - "Wake model - TBD" - param ^ - IntKi WakeMod_FVW - 3 - "Wake model - FVW (free vortex wake, OLAF)" - param ^ - IntKi TwrPotent_none - 0 - "no tower potential flow" - @@ -161,7 +161,8 @@ typedef ^ RotInputFile TFinInputFileType TFin - - - "Input file typedef ^ AD_InputFile Logical Echo - - - "Echo input file to echo file" - typedef ^ AD_InputFile DbKi DTAero - - - "Time interval for aerodynamic calculations {or \"default\"}" s -typedef ^ AD_InputFile IntKi WakeMod - - - "Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}" - +typedef ^ AD_InputFile IntKi WakeMod - - - "LEGACY - Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}" - +typedef ^ AD_InputFile IntKi Wake_Mod - - - "Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}" - typedef ^ AD_InputFile IntKi BEM_Mod - - - "Type of BEM model {1=legacy NoSweepPitchTwist, 2=polar grid}" - typedef ^ AD_InputFile IntKi AFAeroMod - - - "Type of blade airfoil aerodynamics model {1=steady model, 2=Beddoes-Leishman unsteady model}" - typedef ^ AD_InputFile IntKi TwrPotent - - - "Type of tower influence on wind based on potential flow around the tower {0=none, 1=baseline potential flow, 2=potential flow with Bak correction}" - @@ -183,13 +184,13 @@ typedef ^ AD_InputFile IntKi Skew_Mod - - - "Select skew model {0=No skew model typedef ^ AD_InputFile Logical SkewMomCorr - - - "Turn the skew momentum correction on or off [used only when SkewMod=1]" - typedef ^ AD_InputFile IntKi SkewRedistrMod - - - "Type of skewed-wake redistribution model (switch) {0=no redistribution, 1=Glauert/Pitt/Peters, 2=Vortex Cylinder} [unsed only when SkewMod=1]" - typedef ^ AD_InputFile ReKi SkewModFactor - - - "Constant used in Pitt/Peters skewed wake model (default is 15*pi/32)" - -typedef ^ AD_InputFile LOGICAL TipLoss - - - "Use the Prandtl tip-loss model? [unused when WakeMod=0]" flag -typedef ^ AD_InputFile LOGICAL HubLoss - - - "Use the Prandtl hub-loss model? [unused when WakeMod=0]" flag -typedef ^ AD_InputFile LOGICAL TanInd - - - "Include tangential induction in BEMT calculations? [unused when WakeMod=0]" flag -typedef ^ AD_InputFile LOGICAL AIDrag - - - "Include the drag term in the axial-induction calculation? [unused when WakeMod=0]" flag -typedef ^ AD_InputFile LOGICAL TIDrag - - - "Include the drag term in the tangential-induction calculation? [unused when WakeMod=0 or TanInd=FALSE]" flag -typedef ^ AD_InputFile ReKi IndToler - - - "Convergence tolerance for BEM induction factors [unused when WakeMod=0]" - -typedef ^ AD_InputFile ReKi MaxIter - - - "Maximum number of iteration steps [unused when WakeMod=0]" - +typedef ^ AD_InputFile LOGICAL TipLoss - - - "Use the Prandtl tip-loss model? [unused when Wake_Mod=0]" flag +typedef ^ AD_InputFile LOGICAL HubLoss - - - "Use the Prandtl hub-loss model? [unused when Wake_Mod=0]" flag +typedef ^ AD_InputFile LOGICAL TanInd - - - "Include tangential induction in BEMT calculations? [unused when Wake_Mod=0]" flag +typedef ^ AD_InputFile LOGICAL AIDrag - - - "Include the drag term in the axial-induction calculation? [unused when Wake_Mod=0]" flag +typedef ^ AD_InputFile LOGICAL TIDrag - - - "Include the drag term in the tangential-induction calculation? [unused when Wake_Mod=0 or TanInd=FALSE]" flag +typedef ^ AD_InputFile ReKi IndToler - - - "Convergence tolerance for BEM induction factors [unused when Wake_Mod=0]" - +typedef ^ AD_InputFile ReKi MaxIter - - - "Maximum number of iteration steps [unused when Wake_Mod=0]" - typedef ^ AD_InputFile Logical SectAvg - - False "Use Sector average for BEM inflow velocity calculation (flag)" - typedef ^ ^ IntKi SA_Weighting - - 1 "Sector Average - Weighting function for sector average {1=Uniform, 2=Impulse, } within a 360/nB sector centered on the blade (switch) [used only when SectAvg=True]" - typedef ^ ^ ReKi SA_PsiBwd - -60 - "Sector Average - Backard Azimuth (<0)" deg @@ -216,7 +217,7 @@ typedef ^ AD_InputFile IntKi NTwOuts - - - "Number of tower node outputs [0 - 9] typedef ^ AD_InputFile IntKi TwOutNd {9} - - "Tower nodes whose values will be output" - typedef ^ AD_InputFile IntKi NumOuts - - - "Number of parameters in the output list (number of outputs requested)" - typedef ^ AD_InputFile CHARACTER(ChanLen) OutList {:} - - "List of user-requested output channels" - -typedef ^ AD_InputFile ReKi tau1_const - - - "time constant for DBEMT [used only when WakeMod=2 and DBEMT_Mod/=2]" s +typedef ^ AD_InputFile ReKi tau1_const - - - "time constant for DBEMT" s typedef ^ AD_InputFile IntKi DBEMT_Mod - - - "Type of dynamic BEMT (DBEMT) model {0=No Dynamic Wake, -1=Frozen Wake for linearization, 1=constant tau1, 2=time-dependent tau1, 3=constant tau1 with continuous formulation} (-) [used only when WakeMod=1]" - typedef ^ AD_InputFile IntKi BldNd_NumOuts - - - "Number of requested output channels per blade node (AD_AllBldNdOuts)" - typedef ^ AD_InputFile CHARACTER(ChanLen) BldNd_OutList {:} - - "List of user-requested output channels (AD_AllBldNdOuts)" - @@ -414,8 +415,8 @@ typedef ^ ParameterType RotParameterType rotors {:} - - "Parameter types for typedef ^ ParameterType DbKi DT - - - "Time step for continuous state integration & discrete state update" seconds typedef ^ ParameterType CHARACTER(1024) RootName - - - "RootName for writing output files" - typedef ^ ParameterType AFI_ParameterType AFI {:} - - "AirfoilInfo parameters" -typedef ^ ParameterType IntKi Skew_Mod - - - "Type of skewed-wake correction model {-1=orthogonal, 0=None, 1=Glauert} [unused when WakeMod=0]" - -typedef ^ ParameterType IntKi WakeMod - - - "Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}" - +typedef ^ ParameterType IntKi Skew_Mod - - - "Type of skewed-wake correction model {-1=orthogonal, 0=None, 1=Glauert} [unused when Wake_Mod=0]" - +typedef ^ ParameterType IntKi Wake_Mod - - - "Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW}" - typedef ^ ParameterType FVW_ParameterType FVW - - - "Parameters for FVW module" typedef ^ ParameterType LOGICAL CompAeroMaps - .FALSE. - "flag to determine if AeroDyn is computing aero maps (true) or running a normal simulation (false)" - typedef ^ ParameterType LOGICAL UA_Flag - - - "logical flag indicating whether to use UnsteadyAero" - diff --git a/modules/aerodyn/src/AeroDyn_Types.f90 b/modules/aerodyn/src/AeroDyn_Types.f90 index 248c731442..0b97b633ed 100644 --- a/modules/aerodyn/src/AeroDyn_Types.f90 +++ b/modules/aerodyn/src/AeroDyn_Types.f90 @@ -41,7 +41,6 @@ MODULE AeroDyn_Types INTEGER(IntKi), PUBLIC, PARAMETER :: ModelUnknown = -1 ! [-] INTEGER(IntKi), PUBLIC, PARAMETER :: WakeMod_none = 0 ! Wake model - none [-] INTEGER(IntKi), PUBLIC, PARAMETER :: WakeMod_BEMT = 1 ! Wake model - BEMT (blade elememnt momentum theory) [-] - INTEGER(IntKi), PUBLIC, PARAMETER :: WakeMod_DBEMT = 2 ! Wake model - DBEMT (dynamic elememnt momentum theory) [-] INTEGER(IntKi), PUBLIC, PARAMETER :: WakeMod_FVW = 3 ! Wake model - FVW (free vortex wake, OLAF) [-] INTEGER(IntKi), PUBLIC, PARAMETER :: TwrPotent_none = 0 ! no tower potential flow [-] INTEGER(IntKi), PUBLIC, PARAMETER :: TwrPotent_baseline = 1 ! baseline tower potential flow [-] @@ -190,7 +189,8 @@ MODULE AeroDyn_Types TYPE, PUBLIC :: AD_InputFile LOGICAL :: Echo = .false. !< Echo input file to echo file [-] REAL(DbKi) :: DTAero = 0.0_R8Ki !< Time interval for aerodynamic calculations {or "default"} [s] - INTEGER(IntKi) :: WakeMod = 0_IntKi !< Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW} [-] + INTEGER(IntKi) :: WakeMod = 0_IntKi !< LEGACY - Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW} [-] + INTEGER(IntKi) :: Wake_Mod = 0_IntKi !< Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW} [-] INTEGER(IntKi) :: BEM_Mod = 0_IntKi !< Type of BEM model {1=legacy NoSweepPitchTwist, 2=polar grid} [-] INTEGER(IntKi) :: AFAeroMod = 0_IntKi !< Type of blade airfoil aerodynamics model {1=steady model, 2=Beddoes-Leishman unsteady model} [-] INTEGER(IntKi) :: TwrPotent = 0_IntKi !< Type of tower influence on wind based on potential flow around the tower {0=none, 1=baseline potential flow, 2=potential flow with Bak correction} [-] @@ -212,13 +212,13 @@ MODULE AeroDyn_Types LOGICAL :: SkewMomCorr = .false. !< Turn the skew momentum correction on or off [used only when SkewMod=1] [-] INTEGER(IntKi) :: SkewRedistrMod = 0_IntKi !< Type of skewed-wake redistribution model (switch) {0=no redistribution, 1=Glauert/Pitt/Peters, 2=Vortex Cylinder} [unsed only when SkewMod=1] [-] REAL(ReKi) :: SkewModFactor = 0.0_ReKi !< Constant used in Pitt/Peters skewed wake model (default is 15*pi/32) [-] - LOGICAL :: TipLoss = .false. !< Use the Prandtl tip-loss model? [unused when WakeMod=0] [flag] - LOGICAL :: HubLoss = .false. !< Use the Prandtl hub-loss model? [unused when WakeMod=0] [flag] - LOGICAL :: TanInd = .false. !< Include tangential induction in BEMT calculations? [unused when WakeMod=0] [flag] - LOGICAL :: AIDrag = .false. !< Include the drag term in the axial-induction calculation? [unused when WakeMod=0] [flag] - LOGICAL :: TIDrag = .false. !< Include the drag term in the tangential-induction calculation? [unused when WakeMod=0 or TanInd=FALSE] [flag] - REAL(ReKi) :: IndToler = 0.0_ReKi !< Convergence tolerance for BEM induction factors [unused when WakeMod=0] [-] - REAL(ReKi) :: MaxIter = 0.0_ReKi !< Maximum number of iteration steps [unused when WakeMod=0] [-] + LOGICAL :: TipLoss = .false. !< Use the Prandtl tip-loss model? [unused when Wake_Mod=0] [flag] + LOGICAL :: HubLoss = .false. !< Use the Prandtl hub-loss model? [unused when Wake_Mod=0] [flag] + LOGICAL :: TanInd = .false. !< Include tangential induction in BEMT calculations? [unused when Wake_Mod=0] [flag] + LOGICAL :: AIDrag = .false. !< Include the drag term in the axial-induction calculation? [unused when Wake_Mod=0] [flag] + LOGICAL :: TIDrag = .false. !< Include the drag term in the tangential-induction calculation? [unused when Wake_Mod=0 or TanInd=FALSE] [flag] + REAL(ReKi) :: IndToler = 0.0_ReKi !< Convergence tolerance for BEM induction factors [unused when Wake_Mod=0] [-] + REAL(ReKi) :: MaxIter = 0.0_ReKi !< Maximum number of iteration steps [unused when Wake_Mod=0] [-] LOGICAL :: SectAvg = .false. !< Use Sector average for BEM inflow velocity calculation (flag) [-] INTEGER(IntKi) :: SA_Weighting = 0_IntKi !< Sector Average - Weighting function for sector average {1=Uniform, 2=Impulse, } within a 360/nB sector centered on the blade (switch) [used only when SectAvg=True] [-] REAL(ReKi) :: SA_PsiBwd = -60 !< Sector Average - Backard Azimuth (<0) [deg] @@ -244,7 +244,7 @@ MODULE AeroDyn_Types INTEGER(IntKi) , DIMENSION(1:9) :: TwOutNd = 0_IntKi !< Tower nodes whose values will be output [-] INTEGER(IntKi) :: NumOuts = 0_IntKi !< Number of parameters in the output list (number of outputs requested) [-] CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: OutList !< List of user-requested output channels [-] - REAL(ReKi) :: tau1_const = 0.0_ReKi !< time constant for DBEMT [used only when WakeMod=2 and DBEMT_Mod/=2] [s] + REAL(ReKi) :: tau1_const = 0.0_ReKi !< time constant for DBEMT [s] INTEGER(IntKi) :: DBEMT_Mod = 0_IntKi !< Type of dynamic BEMT (DBEMT) model {0=No Dynamic Wake, -1=Frozen Wake for linearization, 1=constant tau1, 2=time-dependent tau1, 3=constant tau1 with continuous formulation} (-) [used only when WakeMod=1] [-] INTEGER(IntKi) :: BldNd_NumOuts = 0_IntKi !< Number of requested output channels per blade node (AD_AllBldNdOuts) [-] CHARACTER(ChanLen) , DIMENSION(:), ALLOCATABLE :: BldNd_OutList !< List of user-requested output channels (AD_AllBldNdOuts) [-] @@ -452,8 +452,8 @@ MODULE AeroDyn_Types REAL(DbKi) :: DT = 0.0_R8Ki !< Time step for continuous state integration & discrete state update [seconds] CHARACTER(1024) :: RootName !< RootName for writing output files [-] TYPE(AFI_ParameterType) , DIMENSION(:), ALLOCATABLE :: AFI !< AirfoilInfo parameters [-] - INTEGER(IntKi) :: Skew_Mod = 0_IntKi !< Type of skewed-wake correction model {-1=orthogonal, 0=None, 1=Glauert} [unused when WakeMod=0] [-] - INTEGER(IntKi) :: WakeMod = 0_IntKi !< Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW} [-] + INTEGER(IntKi) :: Skew_Mod = 0_IntKi !< Type of skewed-wake correction model {-1=orthogonal, 0=None, 1=Glauert} [unused when Wake_Mod=0] [-] + INTEGER(IntKi) :: Wake_Mod = 0_IntKi !< Type of wake/induction model {0=none, 1=BEMT, 2=DBEMT, 3=FVW} [-] TYPE(FVW_ParameterType) :: FVW !< Parameters for FVW module [-] LOGICAL :: CompAeroMaps = .FALSE. !< flag to determine if AeroDyn is computing aero maps (true) or running a normal simulation (false) [-] LOGICAL :: UA_Flag = .false. !< logical flag indicating whether to use UnsteadyAero [-] @@ -2577,6 +2577,7 @@ subroutine AD_CopyInputFile(SrcInputFileData, DstInputFileData, CtrlCode, ErrSta DstInputFileData%Echo = SrcInputFileData%Echo DstInputFileData%DTAero = SrcInputFileData%DTAero DstInputFileData%WakeMod = SrcInputFileData%WakeMod + DstInputFileData%Wake_Mod = SrcInputFileData%Wake_Mod DstInputFileData%BEM_Mod = SrcInputFileData%BEM_Mod DstInputFileData%AFAeroMod = SrcInputFileData%AFAeroMod DstInputFileData%TwrPotent = SrcInputFileData%TwrPotent @@ -2744,6 +2745,7 @@ subroutine AD_PackInputFile(Buf, Indata) call RegPack(Buf, InData%Echo) call RegPack(Buf, InData%DTAero) call RegPack(Buf, InData%WakeMod) + call RegPack(Buf, InData%Wake_Mod) call RegPack(Buf, InData%BEM_Mod) call RegPack(Buf, InData%AFAeroMod) call RegPack(Buf, InData%TwrPotent) @@ -2848,6 +2850,8 @@ subroutine AD_UnPackInputFile(Buf, OutData) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%WakeMod) if (RegCheckErr(Buf, RoutineName)) return + call RegUnpack(Buf, OutData%Wake_Mod) + if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%BEM_Mod) if (RegCheckErr(Buf, RoutineName)) return call RegUnpack(Buf, OutData%AFAeroMod) @@ -6427,7 +6431,7 @@ subroutine AD_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, ErrMsg) end do end if DstParamData%Skew_Mod = SrcParamData%Skew_Mod - DstParamData%WakeMod = SrcParamData%WakeMod + DstParamData%Wake_Mod = SrcParamData%Wake_Mod call FVW_CopyParam(SrcParamData%FVW, DstParamData%FVW, CtrlCode, ErrStat2, ErrMsg2) call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) if (ErrStat >= AbortErrLev) return @@ -6503,7 +6507,7 @@ subroutine AD_PackParam(Buf, Indata) end do end if call RegPack(Buf, InData%Skew_Mod) - call RegPack(Buf, InData%WakeMod) + call RegPack(Buf, InData%Wake_Mod) call FVW_PackParam(Buf, InData%FVW) call RegPack(Buf, InData%CompAeroMaps) call RegPack(Buf, InData%UA_Flag) @@ -6568,7 +6572,7 @@ subroutine AD_UnPackParam(Buf, OutData) end if call RegUnpack(Buf, OutData%Skew_Mod) if (RegCheckErr(Buf, RoutineName)) return - call RegUnpack(Buf, OutData%WakeMod) + call RegUnpack(Buf, OutData%Wake_Mod) if (RegCheckErr(Buf, RoutineName)) return call FVW_UnpackParam(Buf, OutData%FVW) ! FVW call RegUnpack(Buf, OutData%CompAeroMaps) diff --git a/modules/aerodyn/src/BEMT.f90 b/modules/aerodyn/src/BEMT.f90 index 568845bf36..34787d0058 100644 --- a/modules/aerodyn/src/BEMT.f90 +++ b/modules/aerodyn/src/BEMT.f90 @@ -1409,7 +1409,7 @@ subroutine BEMT_InitStates(t, u, p, x, xd, z, OtherState, m, AFInfo, ErrStat, Er m%phi = z%phi call BEMT_CalcOutput_Inductions( InputIndex, t, CalculateDBEMTInputs, ApplyCorrections, m%phi, u, p, x, xd, z, OtherState, AFInfo, m%axInduction, m%tanInduction, m%chi, m, errStat, errMsg ) - if (p%DBEMT_Mod /= DBEMT_none) then + if (p%DBEMT_Mod > DBEMT_none) then call DBEMT_InitStates_AllNodes( m%u_DBEMT(InputIndex), p%DBEMT, x%DBEMT, OtherState%DBEMT ) end if @@ -1513,7 +1513,7 @@ subroutine BEMT_CalcOutput_Inductions( InputIndex, t, CalculateDBEMTInputs, Appl !............................................ ! apply DBEMT correction to axInduction and tanInduction: !............................................ - if (p%DBEMT_Mod /= DBEMT_none) then + if (p%DBEMT_Mod > DBEMT_none) then ! If we are using DBEMT, then we will obtain the time-filtered versions of axInduction(i,j), tanInduction(i,j) ! Note that the outputs of DBEMT are the state variables x%vind, so we don't NEED to set the inputs except on initialization step (when we output the inputs instead of the states) @@ -1696,7 +1696,7 @@ subroutine BEMT_CalcContStateDeriv( t, u, p, x, xd, z, OtherState, m, dxdt, AFIn !............................................................................................................................... ! compute derivatives for DBEMT continuous states: !............................................................................................................................... - if (p%DBEMT_Mod /= DBEMT_none) then + if (p%DBEMT_Mod > DBEMT_none) then if (.not. allocated(dxdt%DBEMT%element)) then call DBEMT_CopyContState( x%DBEMT, dxdt%DBEMT, MESH_UPDATECOPY, ErrStat2, ErrMsg2 ) call SetErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName)