Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ffff5b5
HD: Start implementing generalized DOF for potential-flow bodies
luwang00 Jan 13, 2026
7866ec2
HD: Continue implementing generalized DOF for potential-flow bodies
luwang00 Jan 15, 2026
3559f78
HD: Update radiation impulse response function output for generalized…
luwang00 Jan 15, 2026
3dbf31e
HD: Summary file format update
luwang00 Jan 15, 2026
d67af16
HD: Add new output channels for the generalized DOF
luwang00 Jan 16, 2026
474d2ee
HD: Fix wave excitation interpolation for the generalized DOF
luwang00 Jan 16, 2026
38a3f7c
HD: Add some input check for generalized DOF
luwang00 Jan 16, 2026
39f66e9
Update HD driver to allow input of generalizsed DOF time series throu…
luwang00 Jan 16, 2026
ab08555
ExtPtfm: Change the Jacobian subroutines to use the standard numerica…
luwang00 Jan 17, 2026
cb59a51
HD: Fix index
luwang00 Jan 20, 2026
3964a27
Start implementing coupling between HydroDyn and ExtPtfm
luwang00 Jan 21, 2026
1b804ec
HD: Prevent segfault when NAddDOF=0
luwang00 Jan 21, 2026
5a890ac
Add code to handle variable mapping in solve
deslaughter Jan 21, 2026
b9b183d
Move ExtPtfm to tight coupling and fix HD-ExtPtfm mesh mapping
luwang00 Jan 22, 2026
5331725
ExtPtfm: Add perturb to MV_AddVar calls for the states
luwang00 Jan 22, 2026
e6f1426
ExtPtfm: Add coordinate transformation to and from rigid-body frame o…
luwang00 Jan 23, 2026
739af19
ExtPtfm: clean up
luwang00 Jan 23, 2026
00a1851
ExtPtfm: Implement connections and coupling to mooring modules
luwang00 Jan 24, 2026
97a587c
ExtPtfm: Reorganized/reformatted input files and added separate handl…
luwang00 Jan 27, 2026
046fb70
ExtPtfm: Added the option to include fictitious forces and exact self…
luwang00 Jan 27, 2026
d5a9925
ExtPtfm: Fixed bug with WriteOutput variables
luwang00 Feb 3, 2026
99d10f9
ExtPtfm: Change failed input checks to return ErrID_Warn instead of E…
luwang00 Feb 3, 2026
6144825
ExtPtfm: Fixed modal outputs
luwang00 Feb 4, 2026
ee39f64
ExtPtfm: Add the ability to prescribe loads at connection points in a…
luwang00 Feb 7, 2026
ac20e4b
Enable linearization with the ExtPtfm module
luwang00 Feb 18, 2026
40a8c53
Merge branch 'dev' into f/superelement_dev_merge
luwang00 Feb 18, 2026
5acd907
ExtPtfm: Fix input file paths
luwang00 Feb 19, 2026
ef24eeb
Update r-test pointer
luwang00 Feb 19, 2026
59d9b40
ExtPtfm: Fix bug with summary file when no connections are specified
luwang00 Feb 19, 2026
e07fe79
Update openfast_io with new inputs in HydroDyn and ExtPtfm
luwang00 Feb 19, 2026
a4df30a
Update r-test pointer
luwang00 Feb 19, 2026
2418539
HD: Prevent segfault if the WAMIT files have more modes than expected
luwang00 Feb 20, 2026
1ddd0f6
More fixes to ExtPtfm outputs
luwang00 Feb 20, 2026
7072d1e
ExtPtfm: several small changes to match SubDyn behavior
luwang00 Feb 21, 2026
fdacec9
Fixed a WAMIT input file check and updated r-test pointer
luwang00 Feb 23, 2026
1c24524
Update openfast_io to support the changes to ExtPtfm input files
luwang00 Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
972 changes: 721 additions & 251 deletions modules/extptfm/src/ExtPtfm_MCKF.f90

Large diffs are not rendered by default.

774 changes: 510 additions & 264 deletions modules/extptfm/src/ExtPtfm_MCKF_IO.f90

Large diffs are not rendered by default.

91 changes: 70 additions & 21 deletions modules/extptfm/src/ExtPtfm_MCKF_Registry.txt

Large diffs are not rendered by default.

986 changes: 861 additions & 125 deletions modules/extptfm/src/ExtPtfm_MCKF_Types.f90

Large diffs are not rendered by default.

41 changes: 21 additions & 20 deletions modules/hydrodyn/src/Conv_Radiation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
! RdtnOmegaMax, Abort because RdtnDT must be reduced in order to have
! sufficient accuracy in the computation of the radiation impulse response
! functions:
p%NBody = InitInp%NBody
p%NBody = InitInp%NBody ! Can be removed in the future. Role replaced by NDOF.
p%NDOF = InitInp%NDOF
p%RdtnDT = InitInp%RdtnDT ! this is also Interval
RdtnOmegaMax = Pi / InitInp%RdtnDT

Expand All @@ -125,8 +126,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
RETURN
END IF

call AllocAry( u%Velocity, 6*p%NBody, "u%Velocity" , ErrStat2, ErrMsg2 ); call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'Conv_Rdtn_Init' )
call AllocAry( y%F_Rdtn , 6*p%NBody, "y%F_Rdtn" , ErrStat2, ErrMsg2 ); call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'Conv_Rdtn_Init' )
call AllocAry( u%Velocity, p%NDOF, "u%Velocity" , ErrStat2, ErrMsg2 ); call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'Conv_Rdtn_Init' )
call AllocAry( y%F_Rdtn , p%NDOF, "y%F_Rdtn" , ErrStat2, ErrMsg2 ); call SetErrStat( ErrStat2, ErrMsg2, ErrStat, ErrMsg, 'Conv_Rdtn_Init' )

u%Velocity = 0.0 !this is an initial guess;

Expand Down Expand Up @@ -164,14 +165,14 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
RETURN
END IF

ALLOCATE ( p%RdtnKrnl (6*p%NBody,6*p%NBody,0:p%NStepRdtn-1) , STAT=ErrStat )
ALLOCATE ( p%RdtnKrnl (p%NDOF,p%NDOF,0:p%NStepRdtn-1) , STAT=ErrStat )
IF ( ErrStat /= ErrID_None ) THEN
ErrMsg = ' Error allocating memory for the RdtnKrnl array.'
ErrStat = ErrID_Fatal
RETURN
END IF

ALLOCATE ( xd%XDHistory(6*p%NBody,0:p%NStepRdtn) , STAT=ErrStat ) ! In the numerical convolution we must have NStepRdtn1 elements within the XDHistory array, which is one more than the NStepRdtn elements that are in the RdtnKrnl array
ALLOCATE ( xd%XDHistory(p%NDOF,0:p%NStepRdtn) , STAT=ErrStat ) ! In the numerical convolution we must have NStepRdtn1 elements within the XDHistory array, which is one more than the NStepRdtn elements that are in the RdtnKrnl array
IF ( ErrStat /= ErrID_None ) THEN
ErrMsg = ' Error allocating memory for the XDHistory array.'
ErrStat = ErrID_Fatal
Expand All @@ -180,7 +181,7 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E

! Initialize all elements of the xd%XDHistory array with the initial values of u%Velocity
DO K = 0,p%NStepRdtn-1
DO J = 1,6*p%NBody ! Loop through all DOFs
DO J = 1,p%NDOF ! Loop through all DOFs
xd%XDHistory(J,K) = u%Velocity(J)
END DO
END DO
Expand Down Expand Up @@ -218,8 +219,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
! transform of the wave radiation kernel:

! Indx = 0
DO J = 1,6*p%NBody ! Loop through all rows of RdtnKrnl
DO K = 1,6*p%NBody ! Loop through all columns of RdtnKrnl above and including the diagonal
DO J = 1,p%NDOF ! Loop through all rows of RdtnKrnl
DO K = 1,p%NDOF ! Loop through all columns of RdtnKrnl above and including the diagonal
!Indx = Indx + 1
p%RdtnKrnl(J,K,I) = Krnl_Fact*Omega*( InterpStp( Omega, InitInp%HdroFreq(:), &
InitInp%HdroAddMs(: ,J,K), LastInd, InitInp%NInpFreq ) &
Expand All @@ -243,8 +244,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
RETURN
END IF

DO J = 1,6*p%NBody ! Loop through all rows of RdtnKrnl
DO K = 1,6*p%NBody ! Loop through all columns of RdtnKrnl above and including the diagonal
DO J = 1,p%NDOF ! Loop through all rows of RdtnKrnl
DO K = 1,p%NDOF ! Loop through all columns of RdtnKrnl above and including the diagonal
CALL ApplySINT( p%RdtnKrnl(J,K,:), FFT_Data, ErrStat )
IF ( ErrStat /= ErrID_None ) RETURN
END DO ! K - All columns of RdtnKrnl above and including the diagonal
Expand Down Expand Up @@ -290,8 +291,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
! transform of the wave radiation kernel:

!Indx = 0
DO J = 1,6*p%NBody ! Loop through all rows of RdtnKrnl
DO K = 1,6*p%NBody ! Loop through all columns of RdtnKrnl above and including the diagonal
DO J = 1,p%NDOF ! Loop through all rows of RdtnKrnl
DO K = 1,p%NDOF ! Loop through all columns of RdtnKrnl above and including the diagonal
!Indx = Indx + 1
p%RdtnKrnl(J,K,I) = Krnl_Fact*InterpStp ( Omega, InitInp%HdroFreq(:), InitInp%HdroDmpng(:,J,K), LastInd, InitInp%NInpFreq )
END DO ! K - All columns of RdtnKrnl above and including the diagonal
Expand All @@ -312,8 +313,8 @@ SUBROUTINE Conv_Rdtn_Init( InitInp, u, p, x, xd, z, OtherState, y, m, InitOut, E
RETURN
END IF

DO J = 1,6*p%NBody ! Loop through all rows of RdtnKrnl
DO K = 1,6*p%NBody ! Loop through all columns of RdtnKrnl above and including the diagonal
DO J = 1,p%NDOF ! Loop through all rows of RdtnKrnl
DO K = 1,p%NDOF ! Loop through all columns of RdtnKrnl above and including the diagonal
CALL ApplyCOST( p%RdtnKrnl(J,K,:), FFT_Data, ErrStat )
IF ( ErrStat /= ErrID_None ) THEN
ErrMsg = 'Error applying Cosine Transform'
Expand Down Expand Up @@ -512,7 +513,7 @@ SUBROUTINE Conv_Rdtn_CalcOutput( Time, u, p, x, xd, z, OtherState, y, m, ErrStat

MaxInd = MIN(p%NStepRdtn-1,OtherState%IndRdtn) ! Note: xd%IndRdtn index is from the previous time-step since this state was for the previous time-step

call AllocAry(F_RdtnDT, 6*p%NBody, 1, 'F_RdtnDT', ErrStat2, ErrMsg2)
call AllocAry(F_RdtnDT, p%NDOF, 1, 'F_RdtnDT', ErrStat2, ErrMsg2)
call SetErrStat(ErrStat2, ErrMsg2, ErrStat, ErrMsg, RoutineName)
if (ErrStat >= AbortErrLev) return

Expand All @@ -536,8 +537,8 @@ SUBROUTINE Conv_Rdtn_CalcOutput( Time, u, p, x, xd, z, OtherState, y, m, ErrStat

! Loop through all wave radiation damping forces and moments
! F_RdtnDT = 0.0
! DO I = 1, 6*p%NBody
! DO J = 1,6*p%NBody ! Loop through all platform DOFs
! DO I = 1,p%NDOF
! DO J = 1,p%NDOF ! Loop through all platform DOFs
! ! Contribution from the first and last time steps are halved to make the integration 2nd-order accurate
! F_RdtnDT(I) = F_RdtnDT(I) - 0.5_SiKi * p%RdtnKrnl(MaxInd,I,J)*xd%XDHistory(0,J) &
! - 0.5_SiKi * p%RdtnKrnl(0,I,J)*xd%XDHistory(MaxInd,J)
Expand Down Expand Up @@ -643,18 +644,18 @@ SUBROUTINE Conv_Rdtn_UpdateDiscState( Time, n, u, p, x, xd, z, OtherState, m, Er
! When IndRdtn > LastIndRdtn, IndRdtn will be greater than LastIndRdtn + 1 if DT > RdtnDT.

IF ( OtherState%IndRdtn < (p%NStepRdtn) ) THEN
DO J = 1,6*p%NBody ! Loop through all platform DOFs
DO J = 1,p%NDOF ! Loop through all platform DOFs
xd%XDHistory(J,OtherState%IndRdtn) = u%Velocity(J) ! XDHistory was allocated as a zero-based array!
END DO ! J - All platform DOFs
ELSE

! Shift the stored history by one index
DO K = 0,p%NStepRdtn-2
DO J = 1,6*p%NBody ! Loop through all DOFs
DO J = 1,p%NDOF ! Loop through all DOFs
xd%XDHistory(J,K) = xd%XDHistory(J,K+1)
END DO
END DO
DO J = 1,6*p%NBody ! Loop through all platform DOFs
DO J = 1,p%NDOF ! Loop through all platform DOFs
xd%XDHistory(J,p%NStepRdtn-1) = u%Velocity(J) ! Set the last array element to the current velocity
END DO ! J - All platform DOFs
END IF
Expand Down
2 changes: 2 additions & 0 deletions modules/hydrodyn/src/Conv_Radiation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include Registry_NWTC_Library.txt
typedef Conv_Radiation/Conv_Rdtn InitInputType DbKi RdtnDT - - - "" -
typedef ^ ^ CHARACTER(80) RdtnDTChr
typedef ^ ^ INTEGER NBody - - - "[>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6]" -
typedef ^ ^ INTEGER NDOF - - - "Total number of degrees of freedom for all bodies including AddDOF" -
typedef ^ ^ ReKi HighFreq - - - "" -
typedef ^ ^ CHARACTER(1024) WAMITFile - - - "" -
typedef ^ ^ SiKi HdroAddMs {:}{:}{:} - - "" -
Expand Down Expand Up @@ -68,6 +69,7 @@ typedef ^ MiscVarType INTEGER
typedef ^ ParameterType DbKi DT - - - "Time step for continuous state integration & discrete state update" seconds
typedef ^ ^ DbKi RdtnDT - - - "" -
typedef ^ ^ INTEGER NBody - - - "[>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6]" -
typedef ^ ^ INTEGER NDOF - - - "Total number of degrees of freedom for all bodies including AddDOF" -
typedef ^ ^ SiKi RdtnKrnl {:}{:}{:} - - "" -
typedef ^ ^ INTEGER NStepRdtn - - - "" -
typedef ^ ^ INTEGER NStepRdtn1 - - - "" -
Expand Down
8 changes: 8 additions & 0 deletions modules/hydrodyn/src/Conv_Radiation_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ MODULE Conv_Radiation_Types
REAL(DbKi) :: RdtnDT = 0.0_R8Ki !< [-]
CHARACTER(80) :: RdtnDTChr
INTEGER(IntKi) :: NBody = 0_IntKi !< [>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6] [-]
INTEGER(IntKi) :: NDOF = 0_IntKi !< Total number of degrees of freedom for all bodies including AddDOF [-]
REAL(ReKi) :: HighFreq = 0.0_ReKi !< [-]
CHARACTER(1024) :: WAMITFile !< [-]
REAL(SiKi) , DIMENSION(:,:,:), ALLOCATABLE :: HdroAddMs !< [-]
Expand Down Expand Up @@ -83,6 +84,7 @@ MODULE Conv_Radiation_Types
REAL(DbKi) :: DT = 0.0_R8Ki !< Time step for continuous state integration & discrete state update [seconds]
REAL(DbKi) :: RdtnDT = 0.0_R8Ki !< [-]
INTEGER(IntKi) :: NBody = 0_IntKi !< [>=1; only used when PotMod=1. If NBodyMod=1, the WAMIT data contains a vector of size 6*NBody x 1 and matrices of size 6*NBody x 6*NBody; if NBodyMod>1, there are NBody sets of WAMIT data each with a vector of size 6 x 1 and matrices of size 6 x 6] [-]
INTEGER(IntKi) :: NDOF = 0_IntKi !< Total number of degrees of freedom for all bodies including AddDOF [-]
REAL(SiKi) , DIMENSION(:,:,:), ALLOCATABLE :: RdtnKrnl !< [-]
INTEGER(IntKi) :: NStepRdtn = 0_IntKi !< [-]
INTEGER(IntKi) :: NStepRdtn1 = 0_IntKi !< [-]
Expand Down Expand Up @@ -118,6 +120,7 @@ subroutine Conv_Rdtn_CopyInitInput(SrcInitInputData, DstInitInputData, CtrlCode,
DstInitInputData%RdtnDT = SrcInitInputData%RdtnDT
DstInitInputData%RdtnDTChr = SrcInitInputData%RdtnDTChr
DstInitInputData%NBody = SrcInitInputData%NBody
DstInitInputData%NDOF = SrcInitInputData%NDOF
DstInitInputData%HighFreq = SrcInitInputData%HighFreq
DstInitInputData%WAMITFile = SrcInitInputData%WAMITFile
if (allocated(SrcInitInputData%HdroAddMs)) then
Expand Down Expand Up @@ -186,6 +189,7 @@ subroutine Conv_Rdtn_PackInitInput(RF, Indata)
call RegPack(RF, InData%RdtnDT)
call RegPack(RF, InData%RdtnDTChr)
call RegPack(RF, InData%NBody)
call RegPack(RF, InData%NDOF)
call RegPack(RF, InData%HighFreq)
call RegPack(RF, InData%WAMITFile)
call RegPackAlloc(RF, InData%HdroAddMs)
Expand All @@ -207,6 +211,7 @@ subroutine Conv_Rdtn_UnPackInitInput(RF, OutData)
call RegUnpack(RF, OutData%RdtnDT); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%RdtnDTChr); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NBody); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NDOF); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%HighFreq); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%WAMITFile); if (RegCheckErr(RF, RoutineName)) return
call RegUnpackAlloc(RF, OutData%HdroAddMs); if (RegCheckErr(RF, RoutineName)) return
Expand Down Expand Up @@ -480,6 +485,7 @@ subroutine Conv_Rdtn_CopyParam(SrcParamData, DstParamData, CtrlCode, ErrStat, Er
DstParamData%DT = SrcParamData%DT
DstParamData%RdtnDT = SrcParamData%RdtnDT
DstParamData%NBody = SrcParamData%NBody
DstParamData%NDOF = SrcParamData%NDOF
if (allocated(SrcParamData%RdtnKrnl)) then
LB(1:3) = lbound(SrcParamData%RdtnKrnl)
UB(1:3) = ubound(SrcParamData%RdtnKrnl)
Expand Down Expand Up @@ -516,6 +522,7 @@ subroutine Conv_Rdtn_PackParam(RF, Indata)
call RegPack(RF, InData%DT)
call RegPack(RF, InData%RdtnDT)
call RegPack(RF, InData%NBody)
call RegPack(RF, InData%NDOF)
call RegPackAlloc(RF, InData%RdtnKrnl)
call RegPack(RF, InData%NStepRdtn)
call RegPack(RF, InData%NStepRdtn1)
Expand All @@ -533,6 +540,7 @@ subroutine Conv_Rdtn_UnPackParam(RF, OutData)
call RegUnpack(RF, OutData%DT); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%RdtnDT); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NBody); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NDOF); if (RegCheckErr(RF, RoutineName)) return
call RegUnpackAlloc(RF, OutData%RdtnKrnl); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NStepRdtn); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%NStepRdtn1); if (RegCheckErr(RF, RoutineName)) return
Expand Down
Loading