Skip to content
Draft
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
21 changes: 10 additions & 11 deletions modules/subdyn/src/SubDyn_Output.f90
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,9 @@ SUBROUTINE ConfigOutputNode_MKF_ID(pLst, iElem, iiNode, iStore, NodeID2)
CALL ElemM(p%ElemProps(iElem), pLst%Me(:,:,iiNode,iStore))
CALL ElemK(p%ElemProps(iElem), pLst%Ke(:,:,iiNode,iStore))
CALL ElemF(p%ElemProps(iElem), Init%g, pLst%Fg(:,iiNode,iStore), FCe)
! NOTE: Removing this force contribution for now
! The output of subdyn will just be the "Kx" part for now
!pLst%Fg(:,iiNode,iStore) = pLst%Fg(:,iiNode,iStore) + FCe(1:12) ! Adding cable element force
pLst%Fg(:,iiNode,iStore) = FCe(1:12) ! Adding cable element force
! Apply superposition correction: include both the element gravity force vector
! and the cable pretension nodal force when evaluating internal member loads.
pLst%Fg(:,iiNode,iStore) = pLst%Fg(:,iiNode,iStore) + FCe(1:12) ! gravity force + cable element force
END SUBROUTINE ConfigOutputNode_MKF_ID


Expand Down Expand Up @@ -516,15 +515,15 @@ subroutine ElementForce(pLst, iiNode, JJ, FM_elm, FK_elm, sgn, DIRCOS, bUseInput
end subroutine ElementForce

!====================================================================================================
!> Calculates static and dynamic forces for a given element, using K and M of the element, and
!output quantities Udotdot and Y2 containing the
!and K2 indicating wheter the 1st (1) or 2nd (2) node is to be picked
!> Calculates static and dynamic nodal forces for a given element using its stiffness and mass matrices.
! Udotdot contains nodal accelerations and Y2 contains nodal displacements.
! FirstOrSecond selects whether the node of interest is the first (1) or second (2) node of the element.
!----------------------------------------------------------------------------------------------------
SUBROUTINE CALC_NODE_FORCES(DIRCOS,Me,Ke,Udotdot,Y2 ,Fg, FirstOrSecond, FM_nod, FK_nod)
Real(FEKi), DIMENSION (3,3), INTENT(IN) :: DIRCOS !direction cosice matrix (global to local) (3x3)
Real(FEKi), DIMENSION (12,12), INTENT(IN) :: Me,Ke !element M and K matrices (12x12) in GLOBAL REFERENCE (DIRCOS^T K DIRCOS)
Real(ReKi), DIMENSION (12), INTENT(IN) :: Udotdot, Y2 !acceleration and velocities, gravity forces
Real(FEKi), DIMENSION (12), INTENT(IN) :: Fg !acceleration and velocities, gravity forces
Real(ReKi), DIMENSION (12), INTENT(IN) :: Udotdot, Y2 ! nodal accelerations and nodal displacements
Real(FEKi), DIMENSION (12), INTENT(IN) :: Fg ! constant element load vector (gravity + cable)
Integer(IntKi), INTENT(IN) :: FirstOrSecond !1 or 2 depending on node of interest
REAL(ReKi), DIMENSION (6), INTENT(OUT) :: FM_nod, FK_nod !output static and dynamic forces and moments
!Locals
Expand All @@ -533,7 +532,7 @@ SUBROUTINE CALC_NODE_FORCES(DIRCOS,Me,Ke,Udotdot,Y2 ,Fg, FirstOrSecond, FM_nod,

FM_glb = matmul(Me,Udotdot) ! GLOBAL REFERENCE
FF_glb = matmul(Ke,Y2) ! GLOBAL REFERENCE
FF_glb = FF_glb - Fg ! GLOBAL REFERENCE ! NOTE: Fg is now 0, only the "Kx" part in Fk
FF_glb = FF_glb - Fg ! GLOBAL REFERENCE
DO L=1,4 ! Transforming coordinates 3 at a time
FM_elm((L-1)*3+1:L*3) = matmul(DIRCOS, FM_glb( (L-1)*3+1:L*3 ) )
FF_elm((L-1)*3+1:L*3) = matmul(DIRCOS, FF_glb( (L-1)*3+1:L*3 ) )
Expand All @@ -547,7 +546,7 @@ END SUBROUTINE SDOut_MapOutputs

!====================================================================================================
SUBROUTINE SDOut_CloseSum( UnSum, ErrStat, ErrMsg )
INTEGER, INTENT( IN ) :: UnSum ! the unit number for the SubDyn summary file
INTEGER, INTENT( IN ) :: UnSum ! the unit number for the SubDyn summary file
INTEGER, INTENT( OUT ) :: ErrStat ! returns a non-zero value when an error occurs
CHARACTER(*), INTENT( OUT ) :: ErrMsg ! Error message if ErrStat /= ErrID_None
! Local variables
Expand Down
Loading