Skip to content

Commit

Permalink
Merge pull request #1973 from bjonkman/dev-unstable-pointers
Browse files Browse the repository at this point in the history
Use AD tower diameter for VTK visualization + minor improvements
  • Loading branch information
andrew-platt authored Jan 12, 2024
2 parents 13e4c61 + d120344 commit 4460f39
Show file tree
Hide file tree
Showing 13 changed files with 84 additions and 69 deletions.
2 changes: 1 addition & 1 deletion modules/aerodyn/src/AirfoilInfo.f90
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ SUBROUTINE ReadAFfile ( InitInp, NumCoefsIn, p, ErrStat, ErrMsg, UnEc )
RETURN
END IF

! RelThickness, default is 0.2 if user doesn't know it, only used for Boing-Vertol UA model = 7
! RelThickness, default is 0.2 if user doesn't know it, only used for Boeing-Vertol UA model = 7
CALL ParseVarWDefault ( FileInfo, CurLine, 'RelThickness', p%RelThickness, 0.2_ReKi, ErrStat2, ErrMsg2, UnEc )
if (ErrStat2 >= AbortErrLev) then ! if the line is missing, set RelThickness = -1 and move on...
p%RelThickness=-1 ! To trigger an error
Expand Down
8 changes: 4 additions & 4 deletions modules/aerodyn/src/UnsteadyAero.f90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
! Development plan for the aerodynamic linearization in OpenFAST
! Unpublished
!
! [70] User Documentation / AeroDyn / Unsteady Aerodynamics / Boing-Vertol model
! [70] User Documentation / AeroDyn / Unsteady Aerodynamics / Boeing-Vertol model
! https://openfast.readthedocs.io/
!
! [other] R. Damiani and G. Hayman (2017)
Expand Down Expand Up @@ -1424,7 +1424,7 @@ subroutine UA_ValidateInput(InitInp, ErrStat, ErrMsg)

if (InitInp%UAMod < UA_Gonzalez .or. InitInp%UAMod > UA_BV ) call SetErrStat( ErrID_Fatal, &
"In this version, UAMod must be 2 (Gonzalez's variant), 3 (Minnema/Pierce variant), 4 (continuous HGM model), 5 (HGM with vortex), &
&6 (Oye), 7 (Boing-Vertol)", ErrStat, ErrMsg, RoutineName ) ! NOTE: for later- 1 (baseline/original)
&6 (Oye), 7 (Boeing-Vertol)", ErrStat, ErrMsg, RoutineName ) ! NOTE: for later- 1 (baseline/original)

if (.not. InitInp%FLookUp ) call SetErrStat( ErrID_Fatal, 'FLookUp must be TRUE for this version.', ErrStat, ErrMsg, RoutineName )

Expand Down Expand Up @@ -1664,7 +1664,7 @@ subroutine UA_TurnOff_param(p, AFInfo, ErrStat, ErrMsg)

end subroutine UA_TurnOff_param
!==============================================================================
!> Update discrete states for Boieng Vertol model
!> Update discrete states for Boeing Vertol model
subroutine UA_UpdateDiscOtherState_BV( i, j, u, p, xd, OtherState, AFInfo, m, ErrStat, ErrMsg )
integer , intent(in ) :: i !< node index within a blade
integer , intent(in ) :: j !< blade index
Expand Down Expand Up @@ -3756,7 +3756,7 @@ subroutine UA_CalcOutput( i, j, t, u_in, p, x, xd, OtherState, AFInfo, y, misc,
#endif

contains
!> Calc Outputs for Boieng-Vertol dynamic stall
!> Calc Outputs for Boeing-Vertol dynamic stall
!! See BV_DynStall.f95 of CACTUS, and [70], notations kept more or less consistent
subroutine BV_CalcOutput()
real(ReKi) :: alpha_50
Expand Down
1 change: 0 additions & 1 deletion modules/hydrodyn/src/HydroDyn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ usefrom WAMIT.txt
usefrom WAMIT2.txt
usefrom Morison.txt
usefrom SeaSt_WaveField.txt
usefrom SeaState.txt

param HydroDyn/HydroDyn unused INTEGER MaxHDOutputs - 510 - "The maximum number of output channels supported by this module" -
param HydroDyn/HydroDyn unused INTEGER MaxUserOutputs - 5150 - " Total possible number of output channels: SS_Excitation = 7 + SS_Radiation = 7 + Morison= 4626 + HydroDyn=510 = 5150" -
Expand Down
1 change: 0 additions & 1 deletion modules/hydrodyn/src/HydroDyn_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ MODULE HydroDyn_Types
USE WAMIT_Types
USE WAMIT2_Types
USE Morison_Types
USE SeaState_Types
USE NWTC_Library
IMPLICIT NONE
INTEGER(IntKi), PUBLIC, PARAMETER :: MaxHDOutputs = 510 ! The maximum number of output channels supported by this module [-]
Expand Down
20 changes: 10 additions & 10 deletions modules/nwtc-library/src/NWTC_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ SUBROUTINE AllR4PAry3 ( Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg
ALLOCATE ( Ary(AryDim1,AryDim2,AryDim3) , STAT=ErrStat )
IF ( ErrStat /= 0 ) THEN
ErrStat = ErrID_Fatal
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_R4Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
ELSE
ErrStat = ErrID_None
Expand Down Expand Up @@ -763,7 +763,7 @@ SUBROUTINE AllR8PAry3 ( Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg
ALLOCATE ( Ary(AryDim1,AryDim2,AryDim3) , STAT=ErrStat )
IF ( ErrStat /= 0 ) THEN
ErrStat = ErrID_Fatal
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_R8Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
ELSE
ErrStat = ErrID_None
Expand Down Expand Up @@ -901,7 +901,7 @@ SUBROUTINE AllR4Ary1 ( Ary, AryDim1, Descr, ErrStat, ErrMsg )
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*BYTES_IN_SiKi))//' bytes of memory for the '//TRIM( Descr )//' array.'
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*BYTES_IN_R4Ki))//' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
ErrStat = ErrID_None
Expand Down Expand Up @@ -971,7 +971,7 @@ SUBROUTINE AllR4Ary2 ( Ary, AryDim1, AryDim2, Descr, ErrStat, ErrMsg )
IF ( ALLOCATED(Ary) ) THEN
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*BYTES_IN_SiKi))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*BYTES_IN_R4Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1047,7 +1047,7 @@ SUBROUTINE AllR4Ary3 ( Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg )
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_R4Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1084,7 +1084,7 @@ SUBROUTINE AllR8Ary3 ( Ary, AryDim1, AryDim2, AryDim3, Descr, ErrStat, ErrMsg )
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*BYTES_IN_R8Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1122,7 +1122,7 @@ SUBROUTINE AllR4Ary4 ( Ary, AryDim1, AryDim2, AryDim3, AryDim4, Descr, ErrStat,
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*BYTES_IN_R4Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1160,7 +1160,7 @@ SUBROUTINE AllR8Ary4 ( Ary, AryDim1, AryDim2, AryDim3, AryDim4, Descr, ErrStat,
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*BYTES_IN_R8Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1199,7 +1199,7 @@ SUBROUTINE AllR4Ary5 ( Ary, AryDim1, AryDim2, AryDim3, AryDim4, AryDim5, Descr,
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*AryDim5*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*AryDim5*BYTES_IN_R4Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down Expand Up @@ -1240,7 +1240,7 @@ SUBROUTINE AllR8Ary5 ( Ary, AryDim1, AryDim2, AryDim3, AryDim4, AryDim5, Descr,
IF ( ALLOCATED(Ary) ) THEN ! or Sttus=151 on IVF
ErrMsg = 'Error allocating memory for the '//TRIM( Descr )//' array; array was already allocated.'
ELSE
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*AryDim5*BYTES_IN_REAL))//&
ErrMsg = 'Error allocating '//TRIM(Num2LStr(AryDim1*AryDim2*AryDim3*AryDim4*AryDim5*BYTES_IN_R8Ki))//&
' bytes of memory for the '//TRIM( Descr )//' array.'
END IF
ELSE
Expand Down
18 changes: 9 additions & 9 deletions modules/nwtc-library/src/Registry_NWTC_Library.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ typedef ^ ^ CHARACTER(ChanLen) Name - -
typedef ^ ^ CHARACTER(ChanLen) Units - - - "Units this channel is specified in"
typedef ^ ^ IntKi SignM - - - "Multiplier for output channel; usually -1 (minus) or 0 (invalid channel)"

typedef NWTC_Library FileInfoType IntKi NumLines
typedef ^ ^ IntKi NumFiles
typedef ^ ^ IntKi FileLine {:}
typedef ^ ^ IntKi FileIndx {:}
typedef NWTC_Library FileInfoType IntKi NumLines
typedef ^ ^ IntKi NumFiles
typedef ^ ^ IntKi FileLine {:}
typedef ^ ^ IntKi FileIndx {:}
typedef ^ ^ CHARACTER(MaxFileInfoLineLen) FileList {:}
typedef ^ ^ CHARACTER(MaxFileInfoLineLen) Lines {:}

typedef NWTC_Library Quaternion ReKi q0
typedef ^ ^ ReKi v {3}

typedef NWTC_Library NWTC_RandomNumber_ParameterType IntKi pRNG
typedef ^ ^ IntKi RandSeed {3}
typedef ^ ^ IntKi RandSeedAry {:}
typedef ^ ^ CHARACTER(6) RNG_type
typedef ^ ^ IntKi RandSeed {3}
typedef ^ ^ IntKi RandSeedAry {:}
typedef ^ ^ CHARACTER(6) RNG_type

# This file defines types that may be used from the NWTC_Library
# include this into a component registry file if you wish to use these types
Expand Down Expand Up @@ -76,6 +76,6 @@ typedef ^ ^ R8Ki DisplacedPo
typedef ^ ^ R8Ki LoadLn2_A_Mat {:}{:} - - "The 3-components of the forces for each node of an element in the point-to-line load mapping (for each element)"
typedef ^ ^ R8Ki LoadLn2_F {:}{:} - - "The 6-by-6 matrix that makes up the diagonal of the [A 0; B A] matrix in the point-to-line load mapping"
typedef ^ ^ R8Ki LoadLn2_M {:}{:} - - "The 3-components of the moments for each node of an element in the point-to-line load mapping (for each element)"
typedef ^ ^ MeshMapLinearizationType dM
#typedef ^ ^ MeshType Lumped_Points_Dest - - - "temporary mesh for debugging the lumped values in the line2-to-line2"
typedef ^ ^ MeshMapLinearizationType dM
#typedef ^ ^ MeshType Lumped_Points_Dest - - - "temporary mesh for debugging the lumped values in the line2-to-line2"

6 changes: 3 additions & 3 deletions modules/nwtc-library/src/SysIVF.f90
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@ END SUBROUTINE Get_CWD
!> This routine creates a given directory if it does not already exist.
SUBROUTINE MKDIR ( new_directory_path )

USE IFPORT, ONLY: MAKEDIRQQ
implicit none

character(*), intent(in) :: new_directory_path
character(1024) :: make_command
logical :: directory_exists
logical :: success

! Check if the directory exists first
inquire( directory=trim(new_directory_path), exist=directory_exists )

if ( .NOT. directory_exists ) then
make_command = 'mkdir "'//trim(new_directory_path)//'"'
call system( make_command )
success = MAKEDIRQQ( trim(new_directory_path) )
endif

END SUBROUTINE MKDIR
Expand Down
1 change: 0 additions & 1 deletion modules/nwtc-library/src/SysMatlabWindows.f90
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ MODULE SysSubs
!=======================================================================


INTEGER, PARAMETER :: ConRecL = 120 ! The record length for console output.
INTEGER, PARAMETER :: CU = 6 ! The I/O unit for the console.
INTEGER, PARAMETER :: MaxWrScrLen = 98 ! The maximum number of characters allowed to be written to a line in WrScr

Expand Down
4 changes: 2 additions & 2 deletions modules/nwtc-library/src/VTK.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ module VTK

implicit none

character(8), parameter :: RFMT='E17.8E3'
character(8), parameter :: IFMT='I7'
character(*), parameter :: RFMT='E17.8E3'
character(*), parameter :: IFMT='I7'

! Internal type to ensure the same options are used in between calls for the functions vtk_*
TYPE, PUBLIC :: VTK_Misc
Expand Down
8 changes: 0 additions & 8 deletions modules/nwtc-library/src/readme.txt

This file was deleted.

2 changes: 0 additions & 2 deletions modules/openfast-library/src/FAST_Lin.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2275,8 +2275,6 @@ SUBROUTINE Linear_SD_InputSolve_du( p_FAST, y_FAST, SrvD, u_SD, y_SD, y_ED, HD,
! Transfer MAP loads to ED PlatformPtmesh input:
! we're mapping loads, so we also need the sibling meshes' displacements:

MAP_Start = y_FAST%Lin%Modules(MODULE_MAP)%Instance(1)%LinStartIndx(LIN_INPUT_COL)

MAP_Start = y_FAST%Lin%Modules(MODULE_MAP)%Instance(1)%LinStartIndx(LIN_INPUT_COL)

! NOTE: Assumes at least one MAP Fairlead point
Expand Down
Loading

0 comments on commit 4460f39

Please sign in to comment.