From 06161b0594d3672e92dacb4f709f5a3d303f133f Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Fri, 26 Jun 2020 15:22:37 -0600 Subject: [PATCH] Remove DBG_OUTS from AD15 This will reduce merge conflicts with PR #373 --- modules/aerodyn/src/AeroDyn.f90 | 108 +------------- modules/aerodyn/src/AeroDyn_IO.f90 | 223 ----------------------------- 2 files changed, 1 insertion(+), 330 deletions(-) diff --git a/modules/aerodyn/src/AeroDyn.f90 b/modules/aerodyn/src/AeroDyn.f90 index 498dce19f5..13c9b68733 100644 --- a/modules/aerodyn/src/AeroDyn.f90 +++ b/modules/aerodyn/src/AeroDyn.f90 @@ -83,13 +83,8 @@ subroutine AD_SetInitOut(p, InputFileData, InitOut, errStat, errMsg) integer(IntKi) :: i, j, k, f integer(IntKi) :: NumCoords -#ifdef DBG_OUTS - integer(IntKi) :: m - character(6) ::chanPrefix - character(3) :: TmpChar -#endif - ! Initialize variables for this routine + ! Initialize variables for this routine errStat = ErrID_None errMsg = "" @@ -103,86 +98,10 @@ subroutine AD_SetInitOut(p, InputFileData, InitOut, errStat, errMsg) if (ErrStat >= AbortErrLev) return - -#ifdef DBG_OUTS - ! Loop over blades and nodes to populate the output channel names and units - - do k=1,p%numBlades - do j=1, p%NumBlNds - - m = (k-1)*p%NumBlNds*p%NBlOuts + (j-1)*p%NBlOuts - - WRITE (TmpChar,'(I3.3)') j - chanPrefix = "B"//trim(num2lstr(k))//"N"//TmpChar - InitOut%WriteOutputHdr( m + 1 ) = trim(chanPrefix)//"Twst" - InitOut%WriteOutputUnt( m + 1 ) = ' (deg) ' - InitOut%WriteOutputHdr( m + 2 ) = trim(chanPrefix)//"Psi" - InitOut%WriteOutputUnt( m + 2 ) = ' (deg) ' - InitOut%WriteOutputHdr( m + 3 ) = trim(chanPrefix)//"Vx" - InitOut%WriteOutputUnt( m + 3 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 4 ) = trim(chanPrefix)//"Vy" - InitOut%WriteOutputUnt( m + 4 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 5 ) = ' '//trim(chanPrefix)//"AIn" - InitOut%WriteOutputUnt( m + 5 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 6 ) = ' '//trim(chanPrefix)//"ApIn" - InitOut%WriteOutputUnt( m + 6 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 7 ) = trim(chanPrefix)//"Vrel" - InitOut%WriteOutputUnt( m + 7 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 8 ) = ' '//trim(chanPrefix)//"Phi" - InitOut%WriteOutputUnt( m + 8 ) = ' (deg) ' - InitOut%WriteOutputHdr( m + 9 ) = ' '//trim(chanPrefix)//"AOA" - InitOut%WriteOutputUnt( m + 9 ) = ' (deg) ' - InitOut%WriteOutputHdr( m + 10 ) = ' '//trim(chanPrefix)//"Cl" - InitOut%WriteOutputUnt( m + 10 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 11 ) = ' '//trim(chanPrefix)//"Cd" - InitOut%WriteOutputUnt( m + 11 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 12 ) = ' '//trim(chanPrefix)//"Cm" - InitOut%WriteOutputUnt( m + 12 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 13 ) = ' '//trim(chanPrefix)//"Cx" - InitOut%WriteOutputUnt( m + 13 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 14 ) = ' '//trim(chanPrefix)//"Cy" - InitOut%WriteOutputUnt( m + 14 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 15 ) = ' '//trim(chanPrefix)//"Cn" - InitOut%WriteOutputUnt( m + 15 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 16 ) = ' '//trim(chanPrefix)//"Ct" - InitOut%WriteOutputUnt( m + 16 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 17 ) = ' '//trim(chanPrefix)//"Fl" - InitOut%WriteOutputUnt( m + 17 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 18 ) = ' '//trim(chanPrefix)//"Fd" - InitOut%WriteOutputUnt( m + 18 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 19 ) = ' '//trim(chanPrefix)//"M" - InitOut%WriteOutputUnt( m + 19 ) = ' (N/m^2) ' - InitOut%WriteOutputHdr( m + 20 ) = ' '//trim(chanPrefix)//"Fx" - InitOut%WriteOutputUnt( m + 20 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 21 ) = ' '//trim(chanPrefix)//"Fy" - InitOut%WriteOutputUnt( m + 21 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 22 ) = ' '//trim(chanPrefix)//"Fn" - InitOut%WriteOutputUnt( m + 22 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 23 ) = ' '//trim(chanPrefix)//"Ft" - InitOut%WriteOutputUnt( m + 23 ) = ' (N/m) ' - InitOut%WriteOutputHdr( m + 24 ) = ' '//trim(chanPrefix)//"Gam" - InitOut%WriteOutputUnt( m + 24 ) = ' (m^2/s) ' - InitOut%WriteOutputHdr( m + 25 ) = ' '//trim(chanPrefix)//"Uin" - InitOut%WriteOutputUnt( m + 25 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 26 ) = ' '//trim(chanPrefix)//"Uit" - InitOut%WriteOutputUnt( m + 26 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 27 ) = ' '//trim(chanPrefix)//"Uir" - InitOut%WriteOutputUnt( m + 27 ) = ' (m/s) ' - InitOut%WriteOutputHdr( m + 28 ) = ' '//trim(chanPrefix)//"Clst" - InitOut%WriteOutputUnt( m + 28 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 29 ) = ' '//trim(chanPrefix)//"Cdst" - InitOut%WriteOutputUnt( m + 29 ) = ' (-) ' - InitOut%WriteOutputHdr( m + 30 ) = ' '//trim(chanPrefix)//"Cmst" - InitOut%WriteOutputUnt( m + 30 ) = ' (-) ' - - end do - end do -#else do i=1,p%NumOuts InitOut%WriteOutputHdr(i) = p%OutParam(i)%Name InitOut%WriteOutputUnt(i) = p%OutParam(i)%Units end do -#endif InitOut%Ver = AD_Ver @@ -320,9 +239,6 @@ subroutine AD_Init( InitInp, u, p, x, xd, z, OtherState, y, m, Interval, InitOut ! Display the module information call DispNVD( AD_Ver ) -#ifdef DBG_OUTS - call WrScr(' - Compiled with DBG_OUTS') -#endif p%NumBlades = InitInp%NumBlades ! need this before reading the AD input file so that we know how many blade files to read @@ -564,11 +480,7 @@ subroutine Init_MiscVars(m, p, u, y, errStat, errMsg) m%SigmaCavitCrit = 0.0_ReKi m%CavitWarnSet = .false. ! arrays for output -#ifdef DBG_OUTS - allocate( m%AllOuts(0:p%NumOuts), STAT=ErrStat2 ) ! allocate starting at zero to account for invalid output channels -#else allocate( m%AllOuts(0:MaxOutPts), STAT=ErrStat2 ) ! allocate starting at zero to account for invalid output channels -#endif if (ErrStat2 /= 0) then call SetErrStat( ErrID_Fatal, "Error allocating AllOuts.", errStat, errMsg, RoutineName ) return @@ -1026,12 +938,6 @@ subroutine SetParameters( InitInp, InputFileData, p, ErrStat, ErrMsg ) !p%RootName = TRIM(InitInp%RootName)//'.AD' ! set earlier to it could be used -#ifdef DBG_OUTS - p%NBlOuts = 30 - p%numOuts = p%NumBlNds*p%NumBlades*p%NBlOuts - p%NTwOuts = 0 - -#else p%numOuts = InputFileData%NumOuts p%NBlOuts = InputFileData%NBlOuts p%BlOutNd = InputFileData%BlOutNd @@ -1047,7 +953,6 @@ subroutine SetParameters( InitInp, InputFileData, p, ErrStat, ErrMsg ) call setErrStat(ErrStat2,ErrMsg2,ErrStat,ErrMsg,RoutineName) if (ErrStat >= AbortErrLev) return -#endif end subroutine SetParameters !---------------------------------------------------------------------------------------------------------------------------------- @@ -1296,11 +1201,7 @@ subroutine AD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) ! get values to output to file: !------------------------------------------------------- if (p%NumOuts > 0) then -#ifdef DBG_OUTS - call Calc_WriteDbgOutput( p, u, m, y, OtherState, xd, ErrStat2, ErrMsg2 ) -#else call Calc_WriteOutput( p, u, m, y, OtherState, xd, indx, ErrStat2, ErrMsg2 ) -#endif call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) !............................................................................................................................... @@ -1308,12 +1209,7 @@ subroutine AD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) !............................................................................................................................... do i = 1,p%NumOuts ! Loop through all selected output channels -#ifdef DBG_OUTS - y%WriteOutput(i) = m%AllOuts( i ) -#else y%WriteOutput(i) = p%OutParam(i)%SignM * m%AllOuts( p%OutParam(i)%Indx ) -#endif - end do ! i - All selected output channels end if @@ -1586,9 +1482,7 @@ subroutine GeomWithoutSweepPitchTwist(p,u,m,thetaBladeNds,ErrStat,ErrMsg) call LAPACK_gemm( 'n', 't', 1.0_R8Ki, u%BladeRootMotion(k)%Orientation(:,:,1), u%HubMotion%Orientation(:,:,1), 0.0_R8Ki, orientation, errStat2, errMsg2) call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName) theta = EulerExtract( orientation ) !hub_theta_root(k) -#ifndef DBG_OUTS m%AllOuts( BPitch( k) ) = -theta(3)*R2D ! save this value of pitch for potential output -#endif theta(3) = 0.0_ReKi m%hub_theta_x_root(k) = theta(1) ! save this value for FAST.Farm diff --git a/modules/aerodyn/src/AeroDyn_IO.f90 b/modules/aerodyn/src/AeroDyn_IO.f90 index e1902ee4fb..51f73cf4f9 100644 --- a/modules/aerodyn/src/AeroDyn_IO.f90 +++ b/modules/aerodyn/src/AeroDyn_IO.f90 @@ -1590,225 +1590,6 @@ REAL(ReKi) FUNCTION Calc_Chi0(V_diskAvg, V_dot_x) END FUNCTION Calc_Chi0 - -!---------------------------------------------------------------------------------------------------------------------------------- -SUBROUTINE Calc_WriteDbgOutput( p, u, m, y, OtherState, xd, ErrStat, ErrMsg ) - - TYPE(AD_ParameterType), INTENT(IN ) :: p ! The module parameters - TYPE(AD_InputType), INTENT(IN ) :: u ! inputs - TYPE(AD_MiscVarType), INTENT(INOUT) :: m ! misc variables - TYPE(AD_OutputType), INTENT(IN ) :: y ! outputs - TYPE(AD_OtherStateType), INTENT(IN ) :: OtherState ! OtherState - TYPE(AD_DiscreteStateType),INTENT(IN ) :: xd ! Discrete states - INTEGER(IntKi), INTENT( OUT) :: ErrStat ! The error status code - CHARACTER(*), INTENT( OUT) :: ErrMsg ! The error message, if an error occurred - - ! local variables - integer, parameter :: indx = 1 ! m%BEMT_u(1) is at t; m%BEMT_u(2) is t+dt - CHARACTER(*), PARAMETER :: RoutineName = 'Calc_WriteOutput' - !INTEGER(intKi) :: ErrStat2 - !CHARACTER(ErrMsgLen) :: ErrMsg2 - - INTEGER(IntKi) :: j,k,i - REAL(ReKi) :: ct, st ! cosine, sine of theta - REAL(ReKi) :: cp, sp ! cosine, sine of phi - ! Transformation matrices - !real(R8Ki), dimension(3,3) :: M_cg ! from global to airfoil-chord (this is well defined, also called "n-t" system in AeroDyn) - real(ReKi), dimension(3,3) :: M_sg ! from global to section (this is ill-defined, also called "x-y" system in AeroDyn), this coordinate is used to define the "axial" and "tangential" inductions - real(ReKi), dimension(3,3) :: M_ph ! Transformation from hub to "blade-rotor-plane": n,t,r (not the same as AeroDyn) - real(ReKi), dimension(3,3) :: M_pg ! Transformation from global to "blade-rotor-plane" (n,t,r), with same x at hub coordinate system - real(ReKi) :: psi_hub ! Azimuth wrt hub - real(ReKi), dimension(3) :: Vind_g ! Induced velocity vector in global coordinates - real(ReKi), dimension(3) :: Vind_s ! Induced velocity vector in section coordinates (AeroDyn "x-y") - - - ! start routine: - ErrStat = ErrID_None - ErrMsg = "" - - - if (p%WakeMod /= WakeMod_FVW) then - ! blade outputs - do k=1,p%numBlades - - ! Rotor plane, polar coordinate system - psi_hub = TwoPi*(k-1)/p%NumBlades - M_ph(1,1:3) = (/ 1.0_ReKi, 0.0_ReKi , 0.0_ReKi /) - M_ph(2,1:3) = (/ 0.0_ReKi, cos(psi_hub), sin(psi_hub) /) - M_ph(3,1:3) = (/ 0.0_ReKi,-sin(psi_hub), cos(psi_hub) /) - M_pg = matmul(M_ph, u%HubMotion%Orientation(1:3,1:3,1) ) - - - ! m%AllOuts( BPitch( k) ) = calculated in SetInputsForBEMT - - do j=1,p%NumBlNds - - i = (k-1)*p%NumBlNds*p%NBlOuts + (j-1)*p%NBlOuts +1 - - m%AllOuts( i ) = m%BEMT_u(indx)%theta(j,k)*R2D - m%AllOuts( i+1 ) = m%BEMT_u(indx)%psi(k)*R2D - m%AllOuts( i+2 ) = -m%BEMT_u(indx)%Vx(j,k) - m%AllOuts( i+3 ) = m%BEMT_u(indx)%Vy(j,k) - - m%AllOuts( i+4 ) = m%BEMT_y%axInduction(j,k) - m%AllOuts( i+5 ) = m%BEMT_y%tanInduction(j,k) - m%AllOuts( i+6 ) = m%BEMT_y%Vrel(j,k) - m%AllOuts( i+7 ) = m%BEMT_y%phi(j,k)*R2D - m%AllOuts( i+8 ) = (m%BEMT_y%phi(j,k) - m%BEMT_u(indx)%theta(j,k))*R2D - - - m%AllOuts( i+9 ) = m%BEMT_y%Cl(j,k) - m%AllOuts( i+10 ) = m%BEMT_y%Cd(j,k) - m%AllOuts( i+11 ) = m%BEMT_y%Cm(j,k) - m%AllOuts( i+12 ) = m%BEMT_y%Cx(j,k) - m%AllOuts( i+13 ) = m%BEMT_y%Cy(j,k) - - ct=cos(m%BEMT_u(indx)%theta(j,k)) - st=sin(m%BEMT_u(indx)%theta(j,k)) - m%AllOuts( i+14 ) = m%BEMT_y%Cx(j,k)*ct + m%BEMT_y%Cy(j,k)*st - m%AllOuts( i+15 ) = -m%BEMT_y%Cx(j,k)*st + m%BEMT_y%Cy(j,k)*ct - - cp=cos(m%BEMT_y%phi(j,k)) - sp=sin(m%BEMT_y%phi(j,k)) - m%AllOuts( i+16 ) = m%X(j,k)*cp - m%Y(j,k)*sp - m%AllOuts( i+17 ) = m%X(j,k)*sp + m%Y(j,k)*cp - m%AllOuts( i+18 ) = m%M(j,k) - m%AllOuts( i+19 ) = m%X(j,k) - m%AllOuts( i+20 ) = -m%Y(j,k) - m%AllOuts( i+21 ) = m%X(j,k)*ct - m%Y(j,k)*st - m%AllOuts( i+22 ) = -m%X(j,k)*st - m%Y(j,k)*ct - m%AllOuts( i+23 ) = 0.5_ReKi * p%BEMT%chord(j,k) * m%BEMT_y%Vrel(j,k) * m%BEMT_y%Cl(j,k) ! "Gam" [m^2/s] - - M_sg = m%WithoutSweepPitchTwist(:,:,j,k) ! global to "section" - !M_cg = u%BladeMotion(k)%Orientation(1:3,1:3,j) ! global to chord - - Vind_s = (/ -m%BEMT_u(indx)%Vx(j,k)*m%BEMT_y%axInduction(j,k), m%BEMT_u(indx)%Vy(j,k)*m%BEMT_y%tanInduction(j,k), 0.0_ReKi /) - Vind_g = matmul(Vind_s, M_sg) - - m%AllOuts( i+24 ) = dot_product(M_pg(1,:), Vind_g(1:3) ) ! Uihn, hub normal - m%AllOuts( i+25 ) = dot_product(M_pg(2,:), Vind_g(1:3) ) ! Uiht, hub tangential - m%AllOuts( i+26 ) = dot_product(M_pg(3,:), Vind_g(1:3) ) ! Uihr, hub radial - - end do ! nodes - end do ! blades - else ! (p%WakeMod == WakeMod_FVW) - call calc_WriteDbgOutputFVW() - endif - -contains - subroutine Calc_WriteDbgOutputFVW() - use BEMTUnCoupled, only: Compute_UA_AirfoilCoefs - ! local variables - integer, parameter :: indx = 1 ! m%BEMT_u(1) is at t; m%BEMT_u(2) is t+dt - CHARACTER(*), PARAMETER :: RoutineName = 'Calc_WriteOutput' - - INTEGER(IntKi) :: j,k,i - REAL(ReKi) :: ct, st ! cosine, sine of theta - REAL(ReKi) :: cp, sp ! cosine, sine of phi - real(ReKi) :: AxInd, TanInd, Vrel, phi, alpha, Re, theta - real(ReKi) :: GammaVal ! Vorticity - type(AFI_OutputType) :: AFI_interp ! Resulting values from lookup table - real(ReKi) :: UrelWind_s(3) ! Wind in section coords - real(ReKi) :: Vwnd(3) - real(ReKi) :: Cx, Cy, Cl_dyn, Cd_dyn, Cm_dyn - ! Transformation matrices - real(R8Ki), dimension(3,3) :: M_cg ! from global to airfoil-chord (this is well defined, also called "n-t" system in AeroDyn) - real(ReKi), dimension(3,3) :: M_sg ! from global to section (this is ill-defined, also called "x-y" system in AeroDyn), this coordinate is used to define the "axial" and "tangential" inductions - real(ReKi), dimension(3,3) :: M_ph ! Transformation from hub to "blade-rotor-plane": n,t,r (not the same as AeroDyn) - real(ReKi), dimension(3,3) :: M_pg ! Transformation from global to "blade-rotor-plane" (n,t,r), with same x at hub coordinate system - real(ReKi) :: psi_hub ! Azimuth wrt hub - - ! blade outputs - do k=1,p%NumBlades - - ! Rotor plane, polar coordinate system - psi_hub = TwoPi*(k-1)/p%NumBlades - M_ph(1,1:3) = (/ 1.0_ReKi, 0.0_ReKi , 0.0_ReKi /) - M_ph(2,1:3) = (/ 0.0_ReKi, cos(psi_hub), sin(psi_hub) /) - M_ph(3,1:3) = (/ 0.0_ReKi,-sin(psi_hub), cos(psi_hub) /) - M_pg = matmul(M_ph, u%HubMotion%Orientation(1:3,1:3,1) ) - - do j=1,p%NumBlNds -!TODO: Merge with BEM to avoid all code redundancy (discuss with Bonnie) - - i = (k-1)*p%NumBlNds*p%NBlOuts + (j-1)*p%NBlOuts +1 - - ! --- Computing main aero variables from induction - setting local variables - Vwnd = m%DisturbedInflow(:,j,k) ! NOTE: contains tower shadow - M_sg = m%WithoutSweepPitchTwist(:,:,j,k) ! global to "section" - M_cg = u%BladeMotion(k)%Orientation(1:3,1:3,j) ! global to chord - call FVW_AeroOuts(M_sg, M_cg, m%FVW%PitchAndTwist(j,k), u%BladeMotion(k)%TranslationVel(1:3,j), & - m%FVW_y%Vind(1:3,j,k), Vwnd, p%KinVisc, p%FVW%Chord(j,k), & - AxInd, TanInd, Vrel, phi, alpha, Re, UrelWind_s, ErrStat, ErrMsg ) - - ! NOTE: using airfoil coeffs at nodes - ! Compute steady Airfoil Coefs first - call AFI_ComputeAirfoilCoefs( alpha, Re, 0.0_ReKi, p%AFI(p%FVW%AFindx(j,k)), AFI_interp, ErrStat, ErrMsg ) - Cl_dyn = AFI_interp%Cl - Cd_dyn = AFI_interp%Cd - Cm_dyn = AFI_interp%Cm - - if ( m%FVW%UA_Flag) then ! Unsteady coeffs - if ((OtherState%FVW%UA_Flag(j,k)) .and. ( .not. EqualRealNos(Vrel,0.0_ReKi) ) ) then - m%FVW%m_UA%iBladeNode = j - m%FVW%m_UA%iBlade = k - call Compute_UA_AirfoilCoefs( alpha, Vrel, Re, 0.0_ReKi, p%AFI(p%FVW%AFindx(j,k)), m%FVW%p_UA, xd%FVW%UA, OtherState%FVW%UA, m%FVW%y_UA, m%FVW%m_UA, Cl_dyn, Cd_dyn, Cm_dyn, ErrStat, ErrMsg) - end if - end if - - theta = m%FVW%PitchAndTwist(j,k) - - ! --- Setting aerodyn outputs (more or less generic code) - m%AllOuts( i ) = theta*R2D ! "Twst" = phi-alpha -! m%AllOuts( i+1 ) = m%FVW_u(indx)%psi(k)*R2D ! "Psi" - m%AllOuts( i+2 ) = -UrelWind_s(1) ! "Vx" - m%AllOuts( i+3 ) = UrelWind_s(2) ! "Vy" - - m%AllOuts( i+4 ) = AxInd ! "AIn" - m%AllOuts( i+5 ) = TanInd ! "ApIn" - m%AllOuts( i+6 ) = Vrel ! "Vrel" - m%AllOuts( i+7 ) = phi*R2D ! "Phi" - m%AllOuts( i+8 ) = alpha*R2D ! "AOA" - - cp = cos(phi) - sp = sin(phi) - Cx = Cl_dyn*cp + Cd_dyn*sp - Cy = Cl_dyn*sp - Cd_dyn*cp - m%AllOuts( i+9 ) = Cl_dyn ! "Cl" - m%AllOuts( i+10 ) = Cd_dyn ! "Cd" - m%AllOuts( i+11 ) = Cm_dyn ! "Cm" - m%AllOuts( i+12 ) = Cx ! "Cx" - m%AllOuts( i+13 ) = Cy ! "Cy" - - ct=cos(theta) - st=sin(theta) - m%AllOuts( i+14 ) = Cx*ct + Cy*st ! "Cn" - m%AllOuts( i+15 ) = -Cx*st + Cy*ct ! "Ct" - - cp=cos(phi) - sp=sin(phi) - m%AllOuts( i+16 ) = m%X(j,k)*cp - m%Y(j,k)*sp ! "Fl" - m%AllOuts( i+17 ) = m%X(j,k)*sp + m%Y(j,k)*cp ! "Fd" - m%AllOuts( i+18 ) = m%M(j,k) ! "M" - m%AllOuts( i+19 ) = m%X(j,k) ! "Fx" - m%AllOuts( i+20 ) = -m%Y(j,k) ! "Fy" - m%AllOuts( i+21 ) = m%X(j,k)*ct - m%Y(j,k)*st ! "Fn" - m%AllOuts( i+22 ) = -m%X(j,k)*st - m%Y(j,k)*ct ! "Ft" - m%AllOuts( i+23 ) = 0.5_ReKi * p%FVW%Chord(j,k) * Vrel * Cl_dyn ! "Gam" [m^2/s] - - m%AllOuts( i+24 ) = dot_product(M_pg(1,:), m%FVW_y%Vind(1:3,j,k) ) ! Uihn, hub normal - m%AllOuts( i+25 ) = dot_product(M_pg(2,:), m%FVW_y%Vind(1:3,j,k) ) ! Uiht, hub tangential - m%AllOuts( i+26 ) = dot_product(M_pg(3,:), m%FVW_y%Vind(1:3,j,k) ) ! Uihr, hub radial - - m%AllOuts( i+27 ) = AFI_interp%Cl ! "Cl" static - m%AllOuts( i+28 ) = AFI_interp%Cd ! "Cd" static - m%AllOuts( i+29 ) = AFI_interp%Cm ! "Cm" static - - end do ! nodes - end do ! blades - end subroutine Calc_WriteDbgOutputFVW -END SUBROUTINE Calc_WriteDbgOutput - !---------------------------------------------------------------------------------------------------------------------------------- SUBROUTINE Calc_WriteOutput( p, u, m, y, OtherState, xd, indx, ErrStat, ErrMsg ) @@ -3127,9 +2908,6 @@ SUBROUTINE AD_PrintSum( InputFileData, p, u, y, ErrStat, ErrMsg ) end if -#ifndef DBG_OUTS -! p%OutParam isn't allocated when DBG_OUTS is defined - OutPFmt = '( 15x, I4, 2X, A '//TRIM(Num2LStr(ChanLen))//',1 X, A'//TRIM(Num2LStr(ChanLen))//' )' WRITE (UnSu,'(15x,A)') 'Requested Output Channels:' WRITE (UnSu,'(15x,A)') 'Col Parameter Units' @@ -3138,7 +2916,6 @@ SUBROUTINE AD_PrintSum( InputFileData, p, u, y, ErrStat, ErrMsg ) DO I = 0,p%NumOuts WRITE (UnSu,OutPFmt) I, p%OutParam(I)%Name, p%OutParam(I)%Units END DO -#endif CLOSE(UnSu)