Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 14 additions & 2 deletions modules/subdyn/src/SubDyn.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -880,7 +880,9 @@ 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?
Expand All @@ -894,8 +896,18 @@ SUBROUTINE SD_CalcOutput( t, u, p, x, xd, z, OtherState, y, m, ErrStat, ErrMsg )
y%Y2mesh%RotationAcc (:,iSDNode) = m%U_full_dotdot (DOFList(4:6))
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
! --- Y3 mesh and Y2 mesh both have elastic (Guyan+CB) velocities and accelerations
y%Y3mesh%TranslationVel = y%Y2mesh%TranslationVel
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/r-test
Loading