From be28727bf80b1e7ceae7cdc05ca16ab1ba7959f1 Mon Sep 17 00:00:00 2001 From: Hannah Ross Date: Thu, 20 Jul 2023 13:50:15 -0600 Subject: [PATCH] Remove deleted variables BlFb and BlMb from AeroDyn_AllBldNdOuts_IO --- .../aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 | 59 ++++--- modules/aerodyn/src/AeroDyn_Registry.txt | 2 - modules/aerodyn/src/AeroDyn_Types.f90 | 156 ------------------ modules/openfast-library/src/FAST_Types.f90 | 2 +- modules/openfoam/src/OpenFOAM_Types.f90 | 10 +- 5 files changed, 35 insertions(+), 194 deletions(-) diff --git a/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 b/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 index 6e2e74954d..1318ab04e2 100644 --- a/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 +++ b/modules/aerodyn/src/AeroDyn_AllBldNdOuts_IO.f90 @@ -1262,35 +1262,34 @@ SUBROUTINE Calc_WriteAllBldNdOutput( p, p_AD, u, m, m_AD, x, y, OtherState, Indx !================================================ MHK only - ! ***** Buoyant force in inertial, polar, local and airfoil systems***** - ! TODO: Change memory storage order - CASE( BldNd_Fbxi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlFB(iNd,iB,1); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbyi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlFB(iNd,iB,2); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbzi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlFB(iNd,iB,3); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbxi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlMB(iNd,iB,1); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbyi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlMB(iNd,iB,2); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbzi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BlMB(iNd,iB,3); iOut = iOut + 1; enddo;enddo - - CASE( BldNd_Fbxp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_pi(1,:,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbyp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_pi(2,:,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbzp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_pi(3,:,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbxp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_pi(1,:,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbyp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_pi(2,:,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbzp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_pi(3,:,iB) ); iOut = iOut + 1; enddo;enddo - - CASE( BldNd_Fbxl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_li(1,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbyl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_li(2,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbzl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), R_li(3,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbxl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_li(1,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbyl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_li(2,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbzl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), R_li(3,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo - - CASE( BldNd_Fbxa ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), u%BladeMotion(iB)%Orientation(1,:,iNd) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbya ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), u%BladeMotion(iB)%Orientation(2,:,iNd) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Fbza ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlFB(iNd,iB,:), u%BladeMotion(iB)%Orientation(3,:,iNd) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbxa ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), u%BladeMotion(iB)%Orientation(1,:,iNd) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbya ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), u%BladeMotion(iB)%Orientation(2,:,iNd) ); iOut = iOut + 1; enddo;enddo - CASE( BldNd_Mbza ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BlMB(iNd,iB,:), u%BladeMotion(iB)%Orientation(3,:,iNd) ); iOut = iOut + 1; enddo;enddo + ! Buoyant force in inertial, polar, local and airfoil systems + CASE( BldNd_Fbxi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Force (1,iNd); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbyi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Force (2,iNd); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbzi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Force (3,iNd); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbxi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Moment(1,iNd); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbyi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Moment(2,iNd); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbzi ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = m%BladeBuoyLoad(iB)%Moment(3,iNd); iOut = iOut + 1; enddo;enddo + + CASE( BldNd_Fbxp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_pi(1,:,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbyp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_pi(2,:,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbzp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_pi(3,:,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbxp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_pi(1,:,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbyp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_pi(2,:,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbzp ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_pi(3,:,iB) ); iOut = iOut + 1; enddo;enddo + + CASE( BldNd_Fbxl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_li(1,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbyl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_li(2,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbzl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), R_li(3,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbxl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_li(1,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbyl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_li(2,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbzl ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), R_li(3,:,iNd,iB) ); iOut = iOut + 1; enddo;enddo + + CASE( BldNd_Fbxa ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), u%BladeMotion(iB)%Orientation(1,:,iNd) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbya ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), u%BladeMotion(iB)%Orientation(2,:,iNd) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Fbza ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Force (:,iNd), u%BladeMotion(iB)%Orientation(3,:,iNd) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbxa ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), u%BladeMotion(iB)%Orientation(1,:,iNd) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbya ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), u%BladeMotion(iB)%Orientation(2,:,iNd) ); iOut = iOut + 1; enddo;enddo + CASE( BldNd_Mbza ); do iB=1,nB; do iNd=1,nNd; y%WriteOutput(iOut) = dot_product( m%BladeBuoyLoad(iB)%Moment(:,iNd), u%BladeMotion(iB)%Orientation(3,:,iNd) ); iOut = iOut + 1; enddo;enddo !================================================ DEBUG ONLY @@ -1545,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%WakeMod /= WakeMod_BEMT) then InvalidOutput( BldNd_BEM_F_qs ) = .true. InvalidOutput( BldNd_BEM_k_qs ) = .true. InvalidOutput( BldNd_BEM_kp_qs ) = .true. diff --git a/modules/aerodyn/src/AeroDyn_Registry.txt b/modules/aerodyn/src/AeroDyn_Registry.txt index c56f50967d..5f763c8a6c 100644 --- a/modules/aerodyn/src/AeroDyn_Registry.txt +++ b/modules/aerodyn/src/AeroDyn_Registry.txt @@ -288,8 +288,6 @@ typedef ^ RotMiscVarType MeshMapType B_L_2_H_P {:} - - "mapping data structure t typedef ^ RotMiscVarType ReKi SigmaCavitCrit {:}{:} - - "critical cavitation number- inception value (above which cavit will occur)" - typedef ^ RotMiscVarType ReKi SigmaCavit {:}{:} - - "cavitation number at node " - typedef ^ RotMiscVarType Logical CavitWarnSet {:}{:} - - "cavitation warning issued " - -typedef ^ RotMiscVarType ReKi BlFB {:}{:}{:} - - "buoyant force per unit length at blade node" N/m -typedef ^ RotMiscVarType ReKi BlMB {:}{:}{:} - - "buoyant moment per unit length at blade node" Nm/m typedef ^ RotMiscVarType ReKi TwrFB {:}{:} - - "buoyant force per unit length at tower node" N/m typedef ^ RotMiscVarType ReKi TwrMB {:}{:} - - "buoyant moment per unit length at tower node" Nm/m typedef ^ RotMiscVarType ReKi HubFB {:} - - "buoyant force at hub node" N diff --git a/modules/aerodyn/src/AeroDyn_Types.f90 b/modules/aerodyn/src/AeroDyn_Types.f90 index 5b73974ff7..c26eef9940 100644 --- a/modules/aerodyn/src/AeroDyn_Types.f90 +++ b/modules/aerodyn/src/AeroDyn_Types.f90 @@ -328,8 +328,6 @@ MODULE AeroDyn_Types REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: SigmaCavitCrit !< critical cavitation number- inception value (above which cavit will occur) [-] REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: SigmaCavit !< cavitation number at node [-] LOGICAL , DIMENSION(:,:), ALLOCATABLE :: CavitWarnSet !< cavitation warning issued [-] - REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: BlFB !< buoyant force per unit length at blade node [N/m] - REAL(ReKi) , DIMENSION(:,:,:), ALLOCATABLE :: BlMB !< buoyant moment per unit length at blade node [Nm/m] REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: TwrFB !< buoyant force per unit length at tower node [N/m] REAL(ReKi) , DIMENSION(:,:), ALLOCATABLE :: TwrMB !< buoyant moment per unit length at tower node [Nm/m] REAL(ReKi) , DIMENSION(:), ALLOCATABLE :: HubFB !< buoyant force at hub node [N] @@ -9179,38 +9177,6 @@ SUBROUTINE AD_CopyRotMiscVarType( SrcRotMiscVarTypeData, DstRotMiscVarTypeData, END IF DstRotMiscVarTypeData%CavitWarnSet = SrcRotMiscVarTypeData%CavitWarnSet ENDIF -IF (ALLOCATED(SrcRotMiscVarTypeData%BlFB)) THEN - i1_l = LBOUND(SrcRotMiscVarTypeData%BlFB,1) - i1_u = UBOUND(SrcRotMiscVarTypeData%BlFB,1) - i2_l = LBOUND(SrcRotMiscVarTypeData%BlFB,2) - i2_u = UBOUND(SrcRotMiscVarTypeData%BlFB,2) - i3_l = LBOUND(SrcRotMiscVarTypeData%BlFB,3) - i3_u = UBOUND(SrcRotMiscVarTypeData%BlFB,3) - IF (.NOT. ALLOCATED(DstRotMiscVarTypeData%BlFB)) THEN - ALLOCATE(DstRotMiscVarTypeData%BlFB(i1_l:i1_u,i2_l:i2_u,i3_l:i3_u),STAT=ErrStat2) - IF (ErrStat2 /= 0) THEN - CALL SetErrStat(ErrID_Fatal, 'Error allocating DstRotMiscVarTypeData%BlFB.', ErrStat, ErrMsg,RoutineName) - RETURN - END IF - END IF - DstRotMiscVarTypeData%BlFB = SrcRotMiscVarTypeData%BlFB -ENDIF -IF (ALLOCATED(SrcRotMiscVarTypeData%BlMB)) THEN - i1_l = LBOUND(SrcRotMiscVarTypeData%BlMB,1) - i1_u = UBOUND(SrcRotMiscVarTypeData%BlMB,1) - i2_l = LBOUND(SrcRotMiscVarTypeData%BlMB,2) - i2_u = UBOUND(SrcRotMiscVarTypeData%BlMB,2) - i3_l = LBOUND(SrcRotMiscVarTypeData%BlMB,3) - i3_u = UBOUND(SrcRotMiscVarTypeData%BlMB,3) - IF (.NOT. ALLOCATED(DstRotMiscVarTypeData%BlMB)) THEN - ALLOCATE(DstRotMiscVarTypeData%BlMB(i1_l:i1_u,i2_l:i2_u,i3_l:i3_u),STAT=ErrStat2) - IF (ErrStat2 /= 0) THEN - CALL SetErrStat(ErrID_Fatal, 'Error allocating DstRotMiscVarTypeData%BlMB.', ErrStat, ErrMsg,RoutineName) - RETURN - END IF - END IF - DstRotMiscVarTypeData%BlMB = SrcRotMiscVarTypeData%BlMB -ENDIF IF (ALLOCATED(SrcRotMiscVarTypeData%TwrFB)) THEN i1_l = LBOUND(SrcRotMiscVarTypeData%TwrFB,1) i1_u = UBOUND(SrcRotMiscVarTypeData%TwrFB,1) @@ -9497,12 +9463,6 @@ SUBROUTINE AD_DestroyRotMiscVarType( RotMiscVarTypeData, ErrStat, ErrMsg, DEALLO IF (ALLOCATED(RotMiscVarTypeData%CavitWarnSet)) THEN DEALLOCATE(RotMiscVarTypeData%CavitWarnSet) ENDIF -IF (ALLOCATED(RotMiscVarTypeData%BlFB)) THEN - DEALLOCATE(RotMiscVarTypeData%BlFB) -ENDIF -IF (ALLOCATED(RotMiscVarTypeData%BlMB)) THEN - DEALLOCATE(RotMiscVarTypeData%BlMB) -ENDIF IF (ALLOCATED(RotMiscVarTypeData%TwrFB)) THEN DEALLOCATE(RotMiscVarTypeData%TwrFB) ENDIF @@ -9853,16 +9813,6 @@ SUBROUTINE AD_PackRotMiscVarType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, E Int_BufSz = Int_BufSz + 2*2 ! CavitWarnSet upper/lower bounds for each dimension Int_BufSz = Int_BufSz + SIZE(InData%CavitWarnSet) ! CavitWarnSet END IF - Int_BufSz = Int_BufSz + 1 ! BlFB allocated yes/no - IF ( ALLOCATED(InData%BlFB) ) THEN - Int_BufSz = Int_BufSz + 2*3 ! BlFB upper/lower bounds for each dimension - Re_BufSz = Re_BufSz + SIZE(InData%BlFB) ! BlFB - END IF - Int_BufSz = Int_BufSz + 1 ! BlMB allocated yes/no - IF ( ALLOCATED(InData%BlMB) ) THEN - Int_BufSz = Int_BufSz + 2*3 ! BlMB upper/lower bounds for each dimension - Re_BufSz = Re_BufSz + SIZE(InData%BlMB) ! BlMB - END IF Int_BufSz = Int_BufSz + 1 ! TwrFB allocated yes/no IF ( ALLOCATED(InData%TwrFB) ) THEN Int_BufSz = Int_BufSz + 2*2 ! TwrFB upper/lower bounds for each dimension @@ -10772,56 +10722,6 @@ SUBROUTINE AD_PackRotMiscVarType( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, E END DO END DO END IF - IF ( .NOT. ALLOCATED(InData%BlFB) ) THEN - IntKiBuf( Int_Xferred ) = 0 - Int_Xferred = Int_Xferred + 1 - ELSE - IntKiBuf( Int_Xferred ) = 1 - Int_Xferred = Int_Xferred + 1 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlFB,1) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlFB,1) - Int_Xferred = Int_Xferred + 2 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlFB,2) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlFB,2) - Int_Xferred = Int_Xferred + 2 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlFB,3) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlFB,3) - Int_Xferred = Int_Xferred + 2 - - DO i3 = LBOUND(InData%BlFB,3), UBOUND(InData%BlFB,3) - DO i2 = LBOUND(InData%BlFB,2), UBOUND(InData%BlFB,2) - DO i1 = LBOUND(InData%BlFB,1), UBOUND(InData%BlFB,1) - ReKiBuf(Re_Xferred) = InData%BlFB(i1,i2,i3) - Re_Xferred = Re_Xferred + 1 - END DO - END DO - END DO - END IF - IF ( .NOT. ALLOCATED(InData%BlMB) ) THEN - IntKiBuf( Int_Xferred ) = 0 - Int_Xferred = Int_Xferred + 1 - ELSE - IntKiBuf( Int_Xferred ) = 1 - Int_Xferred = Int_Xferred + 1 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlMB,1) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlMB,1) - Int_Xferred = Int_Xferred + 2 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlMB,2) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlMB,2) - Int_Xferred = Int_Xferred + 2 - IntKiBuf( Int_Xferred ) = LBOUND(InData%BlMB,3) - IntKiBuf( Int_Xferred + 1) = UBOUND(InData%BlMB,3) - Int_Xferred = Int_Xferred + 2 - - DO i3 = LBOUND(InData%BlMB,3), UBOUND(InData%BlMB,3) - DO i2 = LBOUND(InData%BlMB,2), UBOUND(InData%BlMB,2) - DO i1 = LBOUND(InData%BlMB,1), UBOUND(InData%BlMB,1) - ReKiBuf(Re_Xferred) = InData%BlMB(i1,i2,i3) - Re_Xferred = Re_Xferred + 1 - END DO - END DO - END DO - END IF IF ( .NOT. ALLOCATED(InData%TwrFB) ) THEN IntKiBuf( Int_Xferred ) = 0 Int_Xferred = Int_Xferred + 1 @@ -12123,62 +12023,6 @@ SUBROUTINE AD_UnPackRotMiscVarType( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat END DO END DO END IF - IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN ! BlFB not allocated - Int_Xferred = Int_Xferred + 1 - ELSE - Int_Xferred = Int_Xferred + 1 - i1_l = IntKiBuf( Int_Xferred ) - i1_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - i2_l = IntKiBuf( Int_Xferred ) - i2_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - i3_l = IntKiBuf( Int_Xferred ) - i3_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - IF (ALLOCATED(OutData%BlFB)) DEALLOCATE(OutData%BlFB) - ALLOCATE(OutData%BlFB(i1_l:i1_u,i2_l:i2_u,i3_l:i3_u),STAT=ErrStat2) - IF (ErrStat2 /= 0) THEN - CALL SetErrStat(ErrID_Fatal, 'Error allocating OutData%BlFB.', ErrStat, ErrMsg,RoutineName) - RETURN - END IF - DO i3 = LBOUND(OutData%BlFB,3), UBOUND(OutData%BlFB,3) - DO i2 = LBOUND(OutData%BlFB,2), UBOUND(OutData%BlFB,2) - DO i1 = LBOUND(OutData%BlFB,1), UBOUND(OutData%BlFB,1) - OutData%BlFB(i1,i2,i3) = ReKiBuf(Re_Xferred) - Re_Xferred = Re_Xferred + 1 - END DO - END DO - END DO - END IF - IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN ! BlMB not allocated - Int_Xferred = Int_Xferred + 1 - ELSE - Int_Xferred = Int_Xferred + 1 - i1_l = IntKiBuf( Int_Xferred ) - i1_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - i2_l = IntKiBuf( Int_Xferred ) - i2_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - i3_l = IntKiBuf( Int_Xferred ) - i3_u = IntKiBuf( Int_Xferred + 1) - Int_Xferred = Int_Xferred + 2 - IF (ALLOCATED(OutData%BlMB)) DEALLOCATE(OutData%BlMB) - ALLOCATE(OutData%BlMB(i1_l:i1_u,i2_l:i2_u,i3_l:i3_u),STAT=ErrStat2) - IF (ErrStat2 /= 0) THEN - CALL SetErrStat(ErrID_Fatal, 'Error allocating OutData%BlMB.', ErrStat, ErrMsg,RoutineName) - RETURN - END IF - DO i3 = LBOUND(OutData%BlMB,3), UBOUND(OutData%BlMB,3) - DO i2 = LBOUND(OutData%BlMB,2), UBOUND(OutData%BlMB,2) - DO i1 = LBOUND(OutData%BlMB,1), UBOUND(OutData%BlMB,1) - OutData%BlMB(i1,i2,i3) = ReKiBuf(Re_Xferred) - Re_Xferred = Re_Xferred + 1 - END DO - END DO - END DO - END IF IF ( IntKiBuf( Int_Xferred ) == 0 ) THEN ! TwrFB not allocated Int_Xferred = Int_Xferred + 1 ELSE diff --git a/modules/openfast-library/src/FAST_Types.f90 b/modules/openfast-library/src/FAST_Types.f90 index afe11cb45c..a3f9d9a9dd 100644 --- a/modules/openfast-library/src/FAST_Types.f90 +++ b/modules/openfast-library/src/FAST_Types.f90 @@ -763,7 +763,7 @@ MODULE FAST_Types CHARACTER(1024) :: RootName !< Root name of FAST output files (overrides normal operation) [-] INTEGER(IntKi) :: NumActForcePtsBlade !< number of actuator line force points in blade [-] INTEGER(IntKi) :: NumActForcePtsTower !< number of actuator line force points in tower [-] - INTEGER(IntKi) :: NodeClusterType !< Node clustering for actuator line (0 - Uniform, 1 - Non-uniform clustered towards tip) [-] + LOGICAL :: NodeClusterType !< Node clustering for actuator line (0 - Uniform, 1 - Non-uniform clustered towards tip) [-] END TYPE FAST_ExternInitType ! ======================= ! ========= FAST_TurbineType ======= diff --git a/modules/openfoam/src/OpenFOAM_Types.f90 b/modules/openfoam/src/OpenFOAM_Types.f90 index a3a92c86e5..3613f4b483 100644 --- a/modules/openfoam/src/OpenFOAM_Types.f90 +++ b/modules/openfoam/src/OpenFOAM_Types.f90 @@ -104,7 +104,7 @@ MODULE OpenFOAM_Types REAL(KIND=C_FLOAT) :: BladeLength REAL(KIND=C_FLOAT) :: TowerHeight REAL(KIND=C_FLOAT) :: TowerBaseHeight - LOGICAL(KIND=C_BOOL) :: NodeClusterType + INTEGER(KIND=C_INT) :: NodeClusterType END TYPE OpFM_ParameterType_C TYPE, PUBLIC :: OpFM_ParameterType TYPE( OpFM_ParameterType_C ) :: C_obj @@ -419,7 +419,7 @@ SUBROUTINE OpFM_PackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrM Re_Xferred = Re_Xferred + 1 ReKiBuf(Re_Xferred) = InData%TowerBaseHeight Re_Xferred = Re_Xferred + 1 - IntKiBuf(Int_Xferred) = TRANSFER(InData%NodeClusterType, IntKiBuf(1)) + IntKiBuf(Int_Xferred) = InData%NodeClusterType Int_Xferred = Int_Xferred + 1 END SUBROUTINE OpFM_PackInitInput @@ -507,7 +507,7 @@ SUBROUTINE OpFM_UnPackInitInput( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, E OutData%TowerBaseHeight = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 OutData%C_obj%TowerBaseHeight = OutData%TowerBaseHeight - OutData%NodeClusterType = TRANSFER(IntKiBuf(Int_Xferred), OutData%NodeClusterType) + OutData%NodeClusterType = IntKiBuf(Int_Xferred) Int_Xferred = Int_Xferred + 1 OutData%C_obj%NodeClusterType = OutData%NodeClusterType END SUBROUTINE OpFM_UnPackInitInput @@ -1957,7 +1957,7 @@ SUBROUTINE OpFM_PackParam( ReKiBuf, DbKiBuf, IntKiBuf, Indata, ErrStat, ErrMsg, Re_Xferred = Re_Xferred + 1 ReKiBuf(Re_Xferred) = InData%TowerBaseHeight Re_Xferred = Re_Xferred + 1 - IntKiBuf(Int_Xferred) = TRANSFER(InData%NodeClusterType, IntKiBuf(1)) + IntKiBuf(Int_Xferred) = InData%NodeClusterType Int_Xferred = Int_Xferred + 1 END SUBROUTINE OpFM_PackParam @@ -2060,7 +2060,7 @@ SUBROUTINE OpFM_UnPackParam( ReKiBuf, DbKiBuf, IntKiBuf, Outdata, ErrStat, ErrMs OutData%TowerBaseHeight = ReKiBuf(Re_Xferred) Re_Xferred = Re_Xferred + 1 OutData%C_obj%TowerBaseHeight = OutData%TowerBaseHeight - OutData%NodeClusterType = TRANSFER(IntKiBuf(Int_Xferred), OutData%NodeClusterType) + OutData%NodeClusterType = IntKiBuf(Int_Xferred) Int_Xferred = Int_Xferred + 1 OutData%C_obj%NodeClusterType = OutData%NodeClusterType END SUBROUTINE OpFM_UnPackParam