From 1ee030ba1187700a2405cdc579e0981e11538c15 Mon Sep 17 00:00:00 2001 From: Roger Bergua Date: Wed, 8 Apr 2026 15:28:41 -0600 Subject: [PATCH 1/4] SubDyn fixed-bottom mesh with SIM --- modules/subdyn/src/SubDyn.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/subdyn/src/SubDyn.f90 b/modules/subdyn/src/SubDyn.f90 index ef7ae276ba..1b081509e9 100644 --- a/modules/subdyn/src/SubDyn.f90 +++ b/modules/subdyn/src/SubDyn.f90 @@ -887,7 +887,7 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) ! Construct the direction cosine matrix given the output angles CALL SmllRotTrans( 'UR_bar input angles', m%U_full_NS(DOFList(4)), m%U_full_NS(DOFList(5)), m%U_full_NS(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return y%Y2mesh%Orientation (:,:,iSDNode) = DCM - y%Y2mesh%TranslationDisp (:,iSDNode) = m%U_full_NS (DOFList(1:3)) !Y2: Guyan+CB (but no SIM) displacements + y%Y2mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) !Y2: Guyan+CB (with SIM) displacements y%Y2mesh%TranslationVel (:,iSDNode) = m%U_full_dot (DOFList(1:3)) y%Y2mesh%TranslationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(1:3)) y%Y2mesh%RotationVel (:,iSDNode) = m%U_full_dot (DOFList(4:6)) From b5369b70bc228ec8ac00f7bacdee097368730979 Mon Sep 17 00:00:00 2001 From: Roger Bergua Date: Thu, 9 Apr 2026 16:38:15 -0600 Subject: [PATCH 2/4] SubDyn Y3 mesh reaction node fixed-bottom --- modules/subdyn/src/SubDyn.f90 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/modules/subdyn/src/SubDyn.f90 b/modules/subdyn/src/SubDyn.f90 index 1b081509e9..3f7a0dbfe4 100644 --- a/modules/subdyn/src/SubDyn.f90 +++ b/modules/subdyn/src/SubDyn.f90 @@ -869,7 +869,7 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) ! --- Rigid body displacements for hydrodyn y%Y2mesh%Orientation (:,:,iSDNode) = Rg2b y%Y2mesh%TranslationDisp (:,iSDNode) = duP(1:3) ! Y2: NOTE: only the rigid-body displacements for floating - ! --- Full elastic displacements for others (moordyn) + ! --- Elastic displacements without SIM for others (Moordyn) y%Y3mesh%Orientation (:,:,iSDNode) = EulerConstructZYX(m%U_full_NS(DOFList(4:6))) y%Y3mesh%TranslationDisp (:,iSDNode) = m%U_full_NS (DOFList(1:3)) ! Y3: Guyan+CB (but no SIM) displacements ! --- Elastic velocities and accelerations @@ -880,22 +880,32 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) end associate enddo else - ! --- Fixed bottom - Y3 and Y2 meshes are identical in this case + ! --- Fixed bottom + ! Y2: Guyan+CB displacements without SIM + ! Y3 = Y2 for all nodes (Guyan+CB, no SIM), then overwrite reaction node(s) with SIM correction for SoilDyn do iSDNode = 1,p%nNodes associate(DOFList => p%NodesDOF(iSDNode)%List) ! Alias to shorten notations ! TODO TODO which orientation to give for joints with more than 6 dofs? ! Construct the direction cosine matrix given the output angles CALL SmllRotTrans( 'UR_bar input angles', m%U_full_NS(DOFList(4)), m%U_full_NS(DOFList(5)), m%U_full_NS(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return y%Y2mesh%Orientation (:,:,iSDNode) = DCM - y%Y2mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) !Y2: Guyan+CB (with SIM) displacements + y%Y2mesh%TranslationDisp (:,iSDNode) = m%U_full_NS (DOFList(1:3)) !Y2: Guyan+CB (but no SIM) displacements y%Y2mesh%TranslationVel (:,iSDNode) = m%U_full_dot (DOFList(1:3)) y%Y2mesh%TranslationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(1:3)) y%Y2mesh%RotationVel (:,iSDNode) = m%U_full_dot (DOFList(4:6)) y%Y2mesh%RotationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(4:6)) + if (any(p%Nodes_C(:,1) == iSDNode)) then + ! Reaction node: Y3 gets Guyan+CB+SIM displacements (for SoilDyn) + CALL SmllRotTrans( 'UR_bar input angles', m%U_full(DOFList(4)), m%U_full(DOFList(5)), m%U_full(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return + y%Y3mesh%Orientation (:,:,iSDNode) = DCM + y%Y3mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) ! Y3: Guyan+CB+SIM displacements + else + ! Non-reaction node: Y3 = Y2 + y%Y3mesh%Orientation (:,:,iSDNode) = y%Y2mesh%Orientation (:,:,iSDNode) + y%Y3mesh%TranslationDisp (:,iSDNode) = y%Y2mesh%TranslationDisp (:,iSDNode) + end if end associate enddo - y%Y3mesh%TranslationDisp = y%Y2mesh%TranslationDisp - y%Y3mesh%Orientation = y%Y2mesh%Orientation endif ! --- Y3 mesh and Y2 mesh both have elastic (Guyan+CB) velocities and accelerations y%Y3mesh%TranslationVel = y%Y2mesh%TranslationVel From 3e937da91f91be14efb36961ce0824fb010f3619 Mon Sep 17 00:00:00 2001 From: Roger Bergua Date: Fri, 10 Apr 2026 11:52:35 -0600 Subject: [PATCH 3/4] SubDyn: refactored Y3 mesh fixed-bottom --- modules/subdyn/src/SubDyn.f90 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/modules/subdyn/src/SubDyn.f90 b/modules/subdyn/src/SubDyn.f90 index 3f7a0dbfe4..4263d8a59e 100644 --- a/modules/subdyn/src/SubDyn.f90 +++ b/modules/subdyn/src/SubDyn.f90 @@ -894,16 +894,18 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg ) y%Y2mesh%TranslationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(1:3)) y%Y2mesh%RotationVel (:,iSDNode) = m%U_full_dot (DOFList(4:6)) y%Y2mesh%RotationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(4:6)) - if (any(p%Nodes_C(:,1) == iSDNode)) then - ! Reaction node: Y3 gets Guyan+CB+SIM displacements (for SoilDyn) - CALL SmllRotTrans( 'UR_bar input angles', m%U_full(DOFList(4)), m%U_full(DOFList(5)), m%U_full(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return - y%Y3mesh%Orientation (:,:,iSDNode) = DCM - y%Y3mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) ! Y3: Guyan+CB+SIM displacements - else - ! Non-reaction node: Y3 = Y2 - y%Y3mesh%Orientation (:,:,iSDNode) = y%Y2mesh%Orientation (:,:,iSDNode) - y%Y3mesh%TranslationDisp (:,iSDNode) = y%Y2mesh%TranslationDisp (:,iSDNode) - end if + end associate + enddo + ! Y3 = Y2 for all nodes (Guyan+CB, no SIM) + y%Y3mesh%TranslationDisp = y%Y2mesh%TranslationDisp + y%Y3mesh%Orientation = y%Y2mesh%Orientation + ! Overwrite reaction node(s) in Y3 mesh with full elastic displacements including SIM (for SoilDyn) + do i = 1, p%nNodes_C + iSDNode = p%Nodes_C(i,1) + associate(DOFList => p%NodesDOF(iSDNode)%List) ! Alias to shorten notations + CALL SmllRotTrans( 'UR_bar input angles', m%U_full(DOFList(4)), m%U_full(DOFList(5)), m%U_full(DOFList(6)), DCM, '', ErrStat2, ErrMsg2); if(Failed()) return + y%Y3mesh%Orientation (:,:,iSDNode) = DCM + y%Y3mesh%TranslationDisp (:,iSDNode) = m%U_full (DOFList(1:3)) ! Y3: Guyan+CB+SIM displacements end associate enddo endif From 6560f988cc6160a60fc62856b0527b46e689b44c Mon Sep 17 00:00:00 2001 From: andrew-platt Date: Mon, 13 Apr 2026 15:02:43 -0600 Subject: [PATCH 4/4] Update r-test OC6 case SlD reaction force changes. --- reg_tests/r-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reg_tests/r-test b/reg_tests/r-test index e007bb70ad..325d288573 160000 --- a/reg_tests/r-test +++ b/reg_tests/r-test @@ -1 +1 @@ -Subproject commit e007bb70ad4277860f655d2d92f48282fce8683b +Subproject commit 325d288573ee4670ec9a1f44151502616cd5319f