Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for large platform yaw offset in OpenFAST #2203

Merged
merged 106 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
75357a2
Merge remote-tracking branch 'upstream/dev-unstable-pointers' into HD…
luwang00 Mar 7, 2024
faa5527
Start implementing large yaw offset in HydroDyn
luwang00 Mar 8, 2024
8326877
Merge remote-tracking branch 'upstream/dev-unstable-pointers' into f/…
luwang00 Mar 8, 2024
45dab73
Continue with HD Large Yaw Offset
luwang00 Mar 8, 2024
1cfd366
Continue with HD Large Yaw Offset
luwang00 Mar 8, 2024
9769bf9
Continue with HD Large Yaw Offset
luwang00 Mar 9, 2024
da71a9d
Continue with HD Large Yaw Offset
luwang00 Mar 9, 2024
5b2a2c5
Continue with HD Large Yaw Offset
luwang00 Mar 9, 2024
b228313
Updated SeaState WaveField interpolation to effectively skip dimensio…
luwang00 Mar 11, 2024
675ae86
Continue with HD Large Yaw Offset
luwang00 Mar 11, 2024
d624683
Continue with HD Large Yaw Offset
luwang00 Mar 11, 2024
eb4d5a0
Continue with HD Large Yaw Offset
luwang00 Mar 11, 2024
cac8920
Continue with HD Large Yaw Offset
luwang00 Mar 12, 2024
5ce1144
Update r-test
luwang00 Mar 13, 2024
bc535aa
Added two new regression tests for large yaw offset.
luwang00 Mar 13, 2024
7d23808
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
cab76b8
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
22e83d1
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
aed5af0
Merge in dev-unstable-pointers
luwang00 Mar 14, 2024
b7de0da
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
187097a
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
cac37c8
Merge in dev-unstable-pointers
luwang00 Mar 14, 2024
14b6e20
Continue with HD Large Yaw Offset
luwang00 Mar 14, 2024
4cf7cc8
Merge in dev-unstable-pointers
luwang00 Mar 14, 2024
261e36c
Avoid invalid memory reference in WAMIT2
luwang00 Mar 15, 2024
bb0cf7e
Remove the input wave frequency checks in WAMIT2 and moving the wave …
luwang00 Mar 15, 2024
8bc3755
Further reduce code duplication for checking input wave headings in W…
luwang00 Mar 15, 2024
2cc106e
Account for PtfmRefZtRot when checking the input wave headings in WAMIT2
luwang00 Mar 15, 2024
a6ed560
Added more stringent requirements for input wave headings when PtfmYM…
luwang00 Mar 15, 2024
19a63b8
Merge in dev-unstable-pointers
luwang00 Mar 15, 2024
147e2cd
Merge in dev-unstable-pointers
luwang00 Mar 15, 2024
80dfcae
Further updates to the handling of wave heading in WAMIT2 to address …
luwang00 Mar 16, 2024
5202cca
More robust checking and handling of wave heading in the WAMIT module…
luwang00 Mar 16, 2024
ce3366b
Additional checking of WAMIT and WAMIT2 input wave headings for gaps …
luwang00 Mar 16, 2024
dc67e91
Added a new HydroDyn r-test for potential-flow loads with dynamic lar…
luwang00 Mar 22, 2024
6f131c7
Merge in dev branch
luwang00 May 10, 2024
24a46fc
Update r-test
luwang00 May 13, 2024
ad5329f
ED: Updated kinematics and equations of motion to support general lar…
luwang00 May 13, 2024
9ce3379
ED: Fix single-precision build
luwang00 May 13, 2024
fe9d7d0
ED: Update tower element angular position outputs
luwang00 May 13, 2024
e48e4df
HD: Update hydrostatic load calculation for potential-flow bodies to …
luwang00 May 20, 2024
db0df1c
Fix error handling in WAMIT_CalcOutput
luwang00 May 20, 2024
85388d7
Updated ED to handle the calculation of reference platform yaw offset…
luwang00 May 20, 2024
6164b9b
Update ED PtfmRefY input to be in degrees instead of in radians to be…
luwang00 May 20, 2024
806300a
Add call to ED_UpdateDiscState to update the PtfmRefY filter state; u…
luwang00 May 21, 2024
1edee66
Move the call to ED_UpdateDiscState up to before updating the contino…
luwang00 May 21, 2024
e10ba5a
Updated MoorDyn to use full ZYX rotation instead of smllRotTrans
luwang00 May 21, 2024
1217c4d
Fix single precision build
luwang00 May 21, 2024
0fd4cbb
Added validity checks for the new ElastoDyn inputs associated with la…
luwang00 May 21, 2024
2dab8d6
Added mass matrix transformation and nonlinear EoM terms for the SD G…
luwang00 Jun 7, 2024
377c355
Merge branch 'dev' into test/SD_floating
luwang00 Jun 10, 2024
e9baac5
Merge branch 'f/ED_FullMoI' into f/LargeYaw
luwang00 Jun 14, 2024
3e35da5
Merge branch 'test/SD_floating' into f/SDLargeYaw
luwang00 Jun 14, 2024
82767a1
Update the unit vectors of hydrodynamic load components in ElastoDyn …
luwang00 Jun 15, 2024
1d57535
Start implementing large platform rotation (Guyan modes) in SubDyn
luwang00 Jun 15, 2024
e2b7b5b
Update the unit vectors of hydrodynamic load components in ElastoDyn …
luwang00 Jun 15, 2024
eb8b088
Update the floating Guyan reaction load calculation for consistent co…
luwang00 Jun 17, 2024
bde1ca1
Merge branch 'f/SDLargeYaw' into f/LargeYaw
luwang00 Jun 17, 2024
6bce95f
Update r-test
luwang00 Jun 18, 2024
042b249
Update HydroDyn to use exact rotation for inputs and outputs to be co…
luwang00 Jun 18, 2024
3241335
Update HD driver to compute angular velocity and angular acceleration…
luwang00 Jun 19, 2024
384ac12
Update r-test
luwang00 Jun 19, 2024
845c1ec
SD: Added transformation of the Guyan damping matrix for floating
luwang00 Jun 20, 2024
9a8c6b1
HD: Compute user added damping forces and moments in the body-fixed f…
luwang00 Jun 20, 2024
71cb957
HD: Warn if large rotation of potential-flow bodies relative to the r…
luwang00 Jun 20, 2024
7a374a2
SD: Remove GuyanLoadCorrection from the input file
luwang00 Jun 20, 2024
fd00edc
Merge branch 'f/ED_FullMoI' into f/LargeYaw
luwang00 Jun 21, 2024
82946e8
HD bug fix: PtfmRefY in Morison input was not set in HydroDyn_CalcOut…
luwang00 Jun 26, 2024
335ce66
Update SDOut_MapOutputs to account for large platform rotation
luwang00 Jun 28, 2024
a5f4250
Various small fixes to SD_CalcOutput
luwang00 Jun 28, 2024
4310232
SD: Recompute the nodal self-weight based on the instantaneous Guyan …
luwang00 Jun 29, 2024
3fe5934
SD: Output only the small elastic part of element rotation for floati…
luwang00 Jul 2, 2024
b1dae43
Merge branch 'dev' into f/LargeYaw
luwang00 Jul 2, 2024
83e5906
HD: Suppress subsequent warnings about platform rotation in WAMIT_Cal…
luwang00 Jul 4, 2024
6523004
Merge branch 'dev' into f/LargeYaw
luwang00 Jul 11, 2024
45c8f1c
SD bug fix: F_I not computed for floating in SD_CalcOutput
luwang00 Jul 12, 2024
950a3eb
Merge branch 'dev' into f/LargeYaw
luwang00 Jul 15, 2024
9c8b453
Merge branch into f/LargeYaw
luwang00 Jul 19, 2024
5ee1896
Merge banch b/HD_ExctnDisp2_Init into f/LargeYaw
luwang00 Jul 22, 2024
6007cd6
HD: Bug fix in functions WrapToPi and WrapTo180
luwang00 Jul 23, 2024
736aa4f
Move PtfmRefY out of ElastoDyn into HydroDyn (work in progress)
luwang00 Jul 23, 2024
2e0909e
Move PtfmRefY and PtfmYMod out of HydroDyn driver and code cleanup
luwang00 Jul 23, 2024
80c0e8d
Move PtfmRefY out of ElastoDyn into HydroDyn (done)
luwang00 Jul 23, 2024
9108e44
Change PtfmRefY input in HydroDyn to be in degrees instead of in radi…
luwang00 Jul 23, 2024
5b90df2
Remove PtfmRefY as an input to HydroDyn (no longer needed)
luwang00 Jul 24, 2024
b588a69
Update HydroDyn c-binding to use full rotation instead of small angle…
luwang00 Jul 24, 2024
3bbbed2
Update r-test pointer
luwang00 Jul 24, 2024
18e5894
Update r-test pointer
luwang00 Jul 25, 2024
a3a93d5
Merge branch 'b/WaveSurf_nonSquare' into f/LargeYaw
luwang00 Jul 27, 2024
ccb8965
Merge branch dev into f/LargeYaw
luwang00 Jul 29, 2024
d80cc32
VS: add missing source file for HD
andrew-platt Jul 31, 2024
80390d1
Merge pull request #12 from andrew-platt/f/LargeYaw
luwang00 Jul 31, 2024
9610757
SD: Bug fixes for y3 mesh node orientation and the handling of cable …
luwang00 Jul 31, 2024
7e28c51
SD: Code update for clarity
luwang00 Aug 1, 2024
c6cf7cd
HD: Add a check to make sure PRP yaw rotation is close to PtfmRefY
luwang00 Aug 2, 2024
907819f
Remove small-angle approximation for the platform and tower during li…
luwang00 Aug 2, 2024
7067b4a
HD: Fix single-precision build
luwang00 Aug 2, 2024
5f1aecb
Update r-test pointer
luwang00 Aug 2, 2024
a855e28
Update r-test pointer
luwang00 Aug 13, 2024
76e26ef
Update r-test pointer
luwang00 Aug 13, 2024
97d5cc6
HD_c: fix error handling in SetMotionMesh after change to EulerConstruct
andrew-platt Aug 14, 2024
f13acfd
MD_c: fix error handling in Set_MotionMesh after change to EulerConst…
luwang00 Aug 14, 2024
4d77630
Update r-test pointer
luwang00 Aug 14, 2024
cbdeb8d
Merge remote-tracking branch 'OpenFAST/dev' into f/LargeYaw
andrew-platt Aug 26, 2024
2374430
Update r-test results and input files
andrew-platt Aug 27, 2024
660777d
Update MHK_RM1_Floating_wNacDrag regression test
andrew-platt Aug 29, 2024
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
2 changes: 1 addition & 1 deletion modules/aerodyn/src/AeroDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -7433,7 +7433,7 @@ SUBROUTINE Perturb_u( p, n, perturb_sign, u, du )
! Module/Mesh/Field: u%TowerMotion%TranslationVel = 11;
! Module/Mesh/Field: u%TowerMotion%TranslationAcc = 12;
case( 9); u%TowerMotion%TranslationDisp(fieldIndx,node) = u%TowerMotion%TranslationDisp( fieldIndx,node) + du * perturb_sign
case(10); CALL PerturbOrientationMatrix( u%TowerMotion%Orientation(:,:,node), du * perturb_sign, fieldIndx, UseSmlAngle=.true. )
case(10); CALL PerturbOrientationMatrix( u%TowerMotion%Orientation(:,:,node), du * perturb_sign, fieldIndx, UseSmlAngle=.false. )
case(11); u%TowerMotion%TranslationVel( fieldIndx,node) = u%TowerMotion%TranslationVel( fieldIndx,node) + du * perturb_sign
case(12); u%TowerMotion%TranslationAcc( fieldIndx,node) = u%TowerMotion%TranslationAcc(fieldIndx,node) + du * perturb_sign

Expand Down
233 changes: 166 additions & 67 deletions modules/elastodyn/src/ElastoDyn.f90

Large diffs are not rendered by default.

29 changes: 14 additions & 15 deletions modules/elastodyn/src/ElastoDyn_IO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4276,22 +4276,21 @@ SUBROUTINE ValidatePrimaryData( InputFileData, BD4Blades, Linearize, MHK, ErrSta
CALL SetErrStat(ErrID_Fatal,'ShftTilt must be between -pi/2 and pi/2 radians (i.e., in the range [-90, 90] degrees).',ErrStat,ErrMsg,RoutineName)
END IF


! Check for violations of the small-angle assumption (15-degree limit, using radians):
IF ( ABS( InputFileData%PtfmRoll ) > SmallAngleLimit_Rad ) THEN
CALL SetErrStat( ErrID_Fatal, 'PtfmRoll must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
//TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
END IF

IF ( ABS( InputFileData%PtfmPitch ) > SmallAngleLimit_Rad ) THEN
CALL SetErrStat( ErrID_Fatal, 'PtfmPitch must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
//TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
END IF

IF ( ABS( InputFileData%PtfmYaw ) > SmallAngleLimit_Rad ) THEN
CALL SetErrStat( ErrID_Fatal, 'PtfmYaw must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
//TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
END IF
! IF ( ABS( InputFileData%PtfmRoll ) > SmallAngleLimit_Rad ) THEN
! CALL SetErrStat( ErrID_Fatal, 'PtfmRoll must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
! //TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
! END IF

! IF ( ABS( InputFileData%PtfmPitch ) > SmallAngleLimit_Rad ) THEN
! CALL SetErrStat( ErrID_Fatal, 'PtfmPitch must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
! //TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
! END IF

! IF ( ABS( InputFileData%PtfmYaw ) > SmallAngleLimit_Rad ) THEN
! CALL SetErrStat( ErrID_Fatal, 'PtfmYaw must be between -'//TRIM(Num2LStr(SmallAngleLimit_Rad))//' and ' &
! //TRIM(Num2LStr(SmallAngleLimit_Rad))//' radians.',ErrStat,ErrMsg,RoutineName)
! END IF

! Check the output parameters:
IF ( InputFileData%DecFact < 1_IntKi ) CALL SetErrStat( ErrID_Fatal, 'DecFact must be greater than 0.',ErrStat,ErrMsg,RoutineName )
Expand Down
6 changes: 6 additions & 0 deletions modules/elastodyn/src/ElastoDyn_Registry.txt
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ typedef ^ ED_InputFile IntKi BldNd_BladesOut - - - "The blades to output (ED
# ..... Internal data types: Coordinate Systems ...................................................................................
# This type defines coordinate sytems used internally by FAST. The 3 components of each vector correspond to the z1, z2, and z3 components of the individual vectors.
# NOTE: the orientations of most of these coordinate systems will change every time step.
typedef ^ ED_CoordSys R8Ki alpha1 3 - - "Vector / direction alpha1 after ptfm yaw rotation" -
typedef ^ ED_CoordSys R8Ki alpha2 3 - - "Vector / direction alpha2 after ptfm yaw rotation" -
typedef ^ ED_CoordSys R8Ki alpha3 3 - - "Vector / direction alpha3 after ptfm yaw rotation" -
typedef ^ ED_CoordSys R8Ki beta1 3 - - "Vector / direction beta1 after ptfm yaw and pitch rotation" -
typedef ^ ED_CoordSys R8Ki beta2 3 - - "Vector / direction beta2 after ptfm yaw and pitch rotation" -
typedef ^ ED_CoordSys R8Ki beta3 3 - - "Vector / direction beta3 after ptfm yaw and pitch rotation" -
typedef ^ ED_CoordSys R8Ki a1 3 - - "Vector / direction a1 (= xt from the IEC coord. system)" -
typedef ^ ED_CoordSys R8Ki a2 3 - - "Vector / direction a2 (= zt from the IEC coord. system)" -
typedef ^ ED_CoordSys R8Ki a3 3 - - "Vector / direction a3 (= -yt from the IEC coord. system)" -
Expand Down
24 changes: 24 additions & 0 deletions modules/elastodyn/src/ElastoDyn_Types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ MODULE ElastoDyn_Types
! =======================
! ========= ED_CoordSys =======
TYPE, PUBLIC :: ED_CoordSys
REAL(R8Ki) , DIMENSION(1:3) :: alpha1 = 0.0_R8Ki !< Vector / direction alpha1 after ptfm yaw rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: alpha2 = 0.0_R8Ki !< Vector / direction alpha2 after ptfm yaw rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: alpha3 = 0.0_R8Ki !< Vector / direction alpha3 after ptfm yaw rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: beta1 = 0.0_R8Ki !< Vector / direction beta1 after ptfm yaw and pitch rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: beta2 = 0.0_R8Ki !< Vector / direction beta2 after ptfm yaw and pitch rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: beta3 = 0.0_R8Ki !< Vector / direction beta3 after ptfm yaw and pitch rotation [-]
REAL(R8Ki) , DIMENSION(1:3) :: a1 = 0.0_R8Ki !< Vector / direction a1 (= xt from the IEC coord. system) [-]
REAL(R8Ki) , DIMENSION(1:3) :: a2 = 0.0_R8Ki !< Vector / direction a2 (= zt from the IEC coord. system) [-]
REAL(R8Ki) , DIMENSION(1:3) :: a3 = 0.0_R8Ki !< Vector / direction a3 (= -yt from the IEC coord. system) [-]
Expand Down Expand Up @@ -2365,6 +2371,12 @@ subroutine ED_CopyCoordSys(SrcCoordSysData, DstCoordSysData, CtrlCode, ErrStat,
character(*), parameter :: RoutineName = 'ED_CopyCoordSys'
ErrStat = ErrID_None
ErrMsg = ''
DstCoordSysData%alpha1 = SrcCoordSysData%alpha1
DstCoordSysData%alpha2 = SrcCoordSysData%alpha2
DstCoordSysData%alpha3 = SrcCoordSysData%alpha3
DstCoordSysData%beta1 = SrcCoordSysData%beta1
DstCoordSysData%beta2 = SrcCoordSysData%beta2
DstCoordSysData%beta3 = SrcCoordSysData%beta3
DstCoordSysData%a1 = SrcCoordSysData%a1
DstCoordSysData%a2 = SrcCoordSysData%a2
DstCoordSysData%a3 = SrcCoordSysData%a3
Expand Down Expand Up @@ -2683,6 +2695,12 @@ subroutine ED_PackCoordSys(RF, Indata)
type(ED_CoordSys), intent(in) :: InData
character(*), parameter :: RoutineName = 'ED_PackCoordSys'
if (RF%ErrStat >= AbortErrLev) return
call RegPack(RF, InData%alpha1)
call RegPack(RF, InData%alpha2)
call RegPack(RF, InData%alpha3)
call RegPack(RF, InData%beta1)
call RegPack(RF, InData%beta2)
call RegPack(RF, InData%beta3)
call RegPack(RF, InData%a1)
call RegPack(RF, InData%a2)
call RegPack(RF, InData%a3)
Expand Down Expand Up @@ -2744,6 +2762,12 @@ subroutine ED_UnPackCoordSys(RF, OutData)
integer(IntKi) :: stat
logical :: IsAllocAssoc
if (RF%ErrStat /= ErrID_None) return
call RegUnpack(RF, OutData%alpha1); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%alpha2); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%alpha3); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%beta1); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%beta2); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%beta3); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%a1); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%a2); if (RegCheckErr(RF, RoutineName)) return
call RegUnpack(RF, OutData%a3); if (RegCheckErr(RF, RoutineName)) return
Expand Down
1 change: 1 addition & 0 deletions modules/hydrodyn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ add_library(hydrodynlib STATIC
src/SS_Excitation_Types.f90
src/WAMIT_Types.f90
src/WAMIT2_Types.f90
src/YawOffset.f90
)
target_link_libraries(hydrodynlib seastlib nwtclibs)

Expand Down
Loading